PM / Domains: Extract code to power off/on a PM domain
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 10 Nov 2014 18:39:19 +0000 (19:39 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 13 Nov 2014 23:07:31 +0000 (00:07 +0100)
commitc8f0ea45169c57f36e6d8c4dcf7ccf09de7f1c2c
treee00a8b808323f4483d449a23c5b99f6e3d8ba3c2
parent895b31f3b6b800b8f46569391f2396b1f221c602
PM / Domains: Extract code to power off/on a PM domain

PM domains are powered on/off from various places. Some callers do
latency measurements, others don't. Consolidate using two helper
functions, which always measure the latencies, and update the stored
latencies when needed.

Other minor changes:
  - Use pr_warn() instead of pr_warning(),
  - There's no need to check genpd->name, %s handles NULL pointers fine,
  - Make the warning format strings identical, to save memory.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c