diff options
Diffstat (limited to 'drivers/rtc/rtc-ps3.c')
-rw-r--r-- | drivers/rtc/rtc-ps3.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c index 968133ce1ee..4bb825bb580 100644 --- a/drivers/rtc/rtc-ps3.c +++ b/drivers/rtc/rtc-ps3.c @@ -62,7 +62,7 @@ static int __init ps3_rtc_probe(struct platform_device *dev) { struct rtc_device *rtc; - rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops, + rtc = devm_rtc_device_register(&dev->dev, "rtc-ps3", &ps3_rtc_ops, THIS_MODULE); if (IS_ERR(rtc)) return PTR_ERR(rtc); @@ -73,7 +73,6 @@ static int __init ps3_rtc_probe(struct platform_device *dev) static int __exit ps3_rtc_remove(struct platform_device *dev) { - rtc_device_unregister(platform_get_drvdata(dev)); return 0; } @@ -85,18 +84,7 @@ static struct platform_driver ps3_rtc_driver = { .remove = __exit_p(ps3_rtc_remove), }; -static int __init ps3_rtc_init(void) -{ - return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe); -} - -static void __exit ps3_rtc_fini(void) -{ - platform_driver_unregister(&ps3_rtc_driver); -} - -module_init(ps3_rtc_init); -module_exit(ps3_rtc_fini); +module_platform_driver_probe(ps3_rtc_driver, ps3_rtc_probe); MODULE_AUTHOR("Sony Corporation"); MODULE_LICENSE("GPL"); |