]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM: Run the driver callback directly if the subsystem one is not there
authorRafael J. Wysocki <rjw@sisk.pl>
Sat, 17 Dec 2011 23:34:13 +0000 (00:34 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 17 Dec 2011 23:34:13 +0000 (00:34 +0100)
commit16eb0761a107f9203100dcaa49776ace5fe5c65b
tree14752fd572ee2ae7178e2eb3f95316c627b980eb
parent1c0a3bf46c15026c6af69661696dbb58ff268424
PM: Run the driver callback directly if the subsystem one is not there

Make the PM core execute driver PM callbacks directly if the
corresponding subsystem callbacks are not present.

There are three reasons for doing that.  First, it reflects the
behavior of drivers/base/dd.c:really_probe() that runs the driver's
.probe() callback directly if the bus type's one is not defined, so
this change will remove one arbitrary difference between the PM core
and the remaining parts of the driver core.  Second, it will allow
some subsystems, whose PM callbacks don't do anything except for
executing driver callbacks, to be simplified quite a bit by removing
those "forward-only" callbacks.  Finally, it will allow us to remove
one level of indirection in the system suspend and resume code paths
where it is not necessary, which is going to lead to less debug noise
with initcall_debug passed in the kernel command line (messages won't
be printed for driverless devices whose subsystems don't provide
PM callbacks among other things).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Documentation/power/devices.txt
Documentation/power/runtime_pm.txt
drivers/base/power/main.c
drivers/base/power/runtime.c