Commit 004731b2 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Linus Torvalds

rtc_cmos: convert shutdown to new pnp_driver->shutdown

commit abd6633c ("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=14889Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reported-by: default avatarMalte 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7f53a09e
...@@ -1096,9 +1096,9 @@ static int cmos_pnp_resume(struct pnp_dev *pnp) ...@@ -1096,9 +1096,9 @@ static int cmos_pnp_resume(struct pnp_dev *pnp)
#define cmos_pnp_resume NULL #define cmos_pnp_resume NULL
#endif #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; return;
cmos_do_shutdown(); cmos_do_shutdown();
...@@ -1117,15 +1117,12 @@ static struct pnp_driver cmos_pnp_driver = { ...@@ -1117,15 +1117,12 @@ static struct pnp_driver cmos_pnp_driver = {
.id_table = rtc_ids, .id_table = rtc_ids,
.probe = cmos_pnp_probe, .probe = cmos_pnp_probe,
.remove = __exit_p(cmos_pnp_remove), .remove = __exit_p(cmos_pnp_remove),
.shutdown = cmos_pnp_shutdown,
/* flag ensures resume() gets called, and stops syslog spam */ /* flag ensures resume() gets called, and stops syslog spam */
.flags = PNP_DRIVER_RES_DO_NOT_CHANGE, .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
.suspend = cmos_pnp_suspend, .suspend = cmos_pnp_suspend,
.resume = cmos_pnp_resume, .resume = cmos_pnp_resume,
.driver = {
.name = (char *)driver_name,
.shutdown = cmos_pnp_shutdown,
}
}; };
#endif /* CONFIG_PNP */ #endif /* CONFIG_PNP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment