aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2010-01-08 17:43:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-11 12:34:07 -0500
commit004731b2c7c658d36bee167cb1e1a399c2cbccc9 (patch)
treed28a3a2beb5655a8855cfdddef9acaa7b8626502 /drivers/rtc
parent7f53a09ed40f08416b3029ada8f02252e7596c18 (diff)
rtc_cmos: convert shutdown to new pnp_driver->shutdown
commit abd6633c67925f90775bb74755f9c547e30f1f20 ("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 <hirofumi@mail.parknet.co.jp> Reported-by: Malte Schröder <maltesch@gmx.de> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: David Hardeman <david@hardeman.nu> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: <stable@kernel.org> [2.6.32.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-cmos.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index c8c12325e69b..e9aa814ddd23 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -1096,9 +1096,9 @@ static int cmos_pnp_resume(struct pnp_dev *pnp)
1096#define cmos_pnp_resume NULL 1096#define cmos_pnp_resume NULL
1097#endif 1097#endif
1098 1098
1099static void cmos_pnp_shutdown(struct device *pdev) 1099static void cmos_pnp_shutdown(struct pnp_dev *pnp)
1100{ 1100{
1101 if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(pdev)) 1101 if (system_state == SYSTEM_POWER_OFF && !cmos_poweroff(&pnp->dev))
1102 return; 1102 return;
1103 1103
1104 cmos_do_shutdown(); 1104 cmos_do_shutdown();
@@ -1117,15 +1117,12 @@ static struct pnp_driver cmos_pnp_driver = {
1117 .id_table = rtc_ids, 1117 .id_table = rtc_ids,
1118 .probe = cmos_pnp_probe, 1118 .probe = cmos_pnp_probe,
1119 .remove = __exit_p(cmos_pnp_remove), 1119 .remove = __exit_p(cmos_pnp_remove),
1120 .shutdown = cmos_pnp_shutdown,
1120 1121
1121 /* flag ensures resume() gets called, and stops syslog spam */ 1122 /* flag ensures resume() gets called, and stops syslog spam */
1122 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 1123 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
1123 .suspend = cmos_pnp_suspend, 1124 .suspend = cmos_pnp_suspend,
1124 .resume = cmos_pnp_resume, 1125 .resume = cmos_pnp_resume,
1125 .driver = {
1126 .name = (char *)driver_name,
1127 .shutdown = cmos_pnp_shutdown,
1128 }
1129}; 1126};
1130 1127
1131#endif /* CONFIG_PNP */ 1128#endif /* CONFIG_PNP */