aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ps3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-ps3.c')
-rw-r--r--drivers/rtc/rtc-ps3.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/rtc/rtc-ps3.c b/drivers/rtc/rtc-ps3.c
index 968133ce1ee8..4bb825bb5804 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)
62{ 62{
63 struct rtc_device *rtc; 63 struct rtc_device *rtc;
64 64
65 rtc = rtc_device_register("rtc-ps3", &dev->dev, &ps3_rtc_ops, 65 rtc = devm_rtc_device_register(&dev->dev, "rtc-ps3", &ps3_rtc_ops,
66 THIS_MODULE); 66 THIS_MODULE);
67 if (IS_ERR(rtc)) 67 if (IS_ERR(rtc))
68 return PTR_ERR(rtc); 68 return PTR_ERR(rtc);
@@ -73,7 +73,6 @@ static int __init ps3_rtc_probe(struct platform_device *dev)
73 73
74static int __exit ps3_rtc_remove(struct platform_device *dev) 74static int __exit ps3_rtc_remove(struct platform_device *dev)
75{ 75{
76 rtc_device_unregister(platform_get_drvdata(dev));
77 return 0; 76 return 0;
78} 77}
79 78
@@ -85,18 +84,7 @@ static struct platform_driver ps3_rtc_driver = {
85 .remove = __exit_p(ps3_rtc_remove), 84 .remove = __exit_p(ps3_rtc_remove),
86}; 85};
87 86
88static int __init ps3_rtc_init(void) 87module_platform_driver_probe(ps3_rtc_driver, ps3_rtc_probe);
89{
90 return platform_driver_probe(&ps3_rtc_driver, ps3_rtc_probe);
91}
92
93static void __exit ps3_rtc_fini(void)
94{
95 platform_driver_unregister(&ps3_rtc_driver);
96}
97
98module_init(ps3_rtc_init);
99module_exit(ps3_rtc_fini);
100 88
101MODULE_AUTHOR("Sony Corporation"); 89MODULE_AUTHOR("Sony Corporation");
102MODULE_LICENSE("GPL"); 90MODULE_LICENSE("GPL");