mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
rtc_cmos: convert shutdown to new pnp_driver->shutdown
commit abd6633c67 ("pnp: add a shutdown
method to pnp drivers") adds shutdown method to bus driver blindly. With
it, driver->shutdown is no longer valid.
Use pnp_driver->shutdown instead.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14889
Signed-off-by: OGAWA Hirofumi <[email protected]>
Reported-by: Malte Schröder <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: David Hardeman <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: <[email protected]> [2.6.32.x]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7f53a09ed4
commit
004731b2c7
1 changed files with 3 additions and 6 deletions
|
|
@ -1096,9 +1096,9 @@ static int cmos_pnp_resume(struct pnp_dev *pnp)
|
|||
#define cmos_pnp_resume NULL
|
||||
#endif
|
||||
|
||||
static void cmos_pnp_shutdown(struct device *pdev)
|
||||
static void cmos_pnp_shutdown(struct pnp_dev *pnp)
|
||||
{
|
||||
if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(pdev))
|
||||
if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pnp->dev))
|
||||
return;
|
||||
|
||||
cmos_do_shutdown();
|
||||
|
|
@ -1117,15 +1117,12 @@ static struct pnp_driver cmos_pnp_driver = {
|
|||
.id_table = rtc_ids,
|
||||
.probe = cmos_pnp_probe,
|
||||
.remove = __exit_p(cmos_pnp_remove),
|
||||
.shutdown = cmos_pnp_shutdown,
|
||||
|
||||
/* flag ensures resume() gets called, and stops syslog spam */
|
||||
.flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
|
||||
.suspend = cmos_pnp_suspend,
|
||||
.resume = cmos_pnp_resume,
|
||||
.driver = {
|
||||
.name = (char *)driver_name,
|
||||
.shutdown = cmos_pnp_shutdown,
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* CONFIG_PNP */
|
||||
|
|
|
|||
Loading…
Reference in a new issue