Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114362
b: refs/heads/master
c: 72f22b1
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Oct 14, 2008
1 parent c68a67c commit 12e7012
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 758a7f7bb86b520aadc484f23da85e547b3bf3d8
refs/heads/master: 72f22b1eb6ca5e4676a632a04d40d46cb61d4562
33 changes: 18 additions & 15 deletions trunk/drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,29 +1120,32 @@ static struct platform_driver cmos_platform_driver = {

static int __init cmos_init(void)
{
int retval = 0;

#ifdef CONFIG_PNP
if (pnp_platform_devices)
return pnp_register_driver(&cmos_pnp_driver);
else
return platform_driver_probe(&cmos_platform_driver,
cmos_platform_probe);
#else
return platform_driver_probe(&cmos_platform_driver,
cmos_platform_probe);
#endif /* CONFIG_PNP */
pnp_register_driver(&cmos_pnp_driver);
#endif

if (!cmos_rtc.dev)
retval = platform_driver_probe(&cmos_platform_driver,
cmos_platform_probe);

if (retval == 0)
return 0;

#ifdef CONFIG_PNP
pnp_unregister_driver(&cmos_pnp_driver);
#endif
return retval;
}
module_init(cmos_init);

static void __exit cmos_exit(void)
{
#ifdef CONFIG_PNP
if (pnp_platform_devices)
pnp_unregister_driver(&cmos_pnp_driver);
else
platform_driver_unregister(&cmos_platform_driver);
#else
pnp_unregister_driver(&cmos_pnp_driver);
#endif
platform_driver_unregister(&cmos_platform_driver);
#endif /* CONFIG_PNP */
}
module_exit(cmos_exit);

Expand Down

0 comments on commit 12e7012

Please sign in to comment.