PM / Domains: Use subsystem runtime suspend/resume callbacks by default
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 15 Jun 2012 22:02:22 +0000 (00:02 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 1 Jul 2012 11:31:29 +0000 (13:31 +0200)
commit0b589741b8b83a33e25fb32bb714ea1b972af5aa
tree40fb1a027166ad3da78848174ec644bf004ad20e
parent6887a4131da3adaab011613776d865f4bcfb5678
PM / Domains: Use subsystem runtime suspend/resume callbacks by default

Currently, the default "save state" and "restore state" routines
for generic PM domains, pm_genpd_default_save_state() and
pm_genpd_default_restore_state(), respectively, only use runtime PM
callbacks provided by device drivers, but in general those callbacks
need not provide the entire necessary functionality.  Namely, in
general it may be necessary to execute subsystem (i.e. device type,
device class or bus type) callbacks that will carry out all of the
necessary operations.

For this reason, modify pm_genpd_default_save_state() and
pm_genpd_default_restore_state() to execute subsystem callbacks,
if they are provided, and fall back to driver callbacks otherwise.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/domain.c