PM / Runtime: Allow helpers to be called by early platform drivers
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 5 Aug 2012 23:45:11 +0000 (01:45 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 3 Sep 2012 23:36:03 +0000 (01:36 +0200)
commitbed2b42d9f0b411f384c5619870ab0fea5dd116b
treeabdfe3a877b5751411ba10d6bf1a57040c56bf73
parente91c11b1a7f876c6f056d872eb210734150a1795
PM / Runtime: Allow helpers to be called by early platform drivers

Runtime PM helper functions, like pm_runtime_get_sync(), cannot be
called by early platform device drivers, because the devices' power
management locks are not initialized at that time.  This is quite
inconvenient, so modify early_platform_add_devices() to initialize
the devices power management locks as appropriate and make sure that
they won't be initialized more than once if an early platform
device is going to be used as a regular one later.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/platform.c
drivers/base/power/power.h
include/linux/pm.h