PM / Domains: Clean up code validating genpd's status
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 20 Mar 2017 10:19:20 +0000 (11:19 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Mar 2017 22:11:34 +0000 (00:11 +0200)
commit41e2c8e0060db250cf70bc2a41ea6595a90b360c
treef3e3ea60668d6a6b75567bac3773a17e67f1279e
parent8ce95844c85349243520b6943ec1225a047d7d6c
PM / Domains: Clean up code validating genpd's status

There exists several similar validations of the genpd->status, against
GPD_STATE_ACTIVE and GPD_STATE_POWER_OFF. Let's clean up this code by
converting to use a helper macro, genpd_status_on().

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c