]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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>
Fri, 17 Aug 2012 17:38:46 +0000 (19:38 +0200)
commit6816488ed5082ef9ca7134deb7c256ddf95db472
treee51428eeed125078bf8786d43b1d2488bf8330f5
parentad0b06c4d930ccb8753cef7795e9747cdaef3d9c
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