aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-generic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 22:47:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 22:47:50 -0400
commit56847d857cb0c3ee78c22ce776a26f88d9ffd4d4 (patch)
treea85bcf204a53e45d26f6a3984f16ddd525eef3e7 /drivers/rtc/rtc-generic.c
parent191a712090bb8a10e6f129360eeed2d68f3d4c9a (diff)
parent8d564368a9a3197f43e56dadf4a18c5738849f94 (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge second batch of fixes from Andrew Morton: - various misc bits - some printk updates - a new "SRAM" driver. - MAINTAINERS updates - the backlight driver queue - checkpatch updates - a few init/ changes - a huge number of drivers/rtc changes - fatfs updates - some lib/idr.c work - some renaming of the random driver interfaces * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (285 commits) net: rename random32 to prandom net/core: remove duplicate statements by do-while loop net/core: rename random32() to prandom_u32() net/netfilter: rename random32() to prandom_u32() net/sched: rename random32() to prandom_u32() net/sunrpc: rename random32() to prandom_u32() scsi: rename random32() to prandom_u32() lguest: rename random32() to prandom_u32() uwb: rename random32() to prandom_u32() video/uvesafb: rename random32() to prandom_u32() mmc: rename random32() to prandom_u32() drbd: rename random32() to prandom_u32() kernel/: rename random32() to prandom_u32() mm/: rename random32() to prandom_u32() lib/: rename random32() to prandom_u32() x86: rename random32() to prandom_u32() x86: pageattr-test: remove srandom32 call uuid: use prandom_bytes() raid6test: use prandom_bytes() sctp: convert sctp_assoc_set_id() to use idr_alloc_cyclic() ...
Diffstat (limited to 'drivers/rtc/rtc-generic.c')
-rw-r--r--drivers/rtc/rtc-generic.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c
index 98322004ad2e..06279ce6bff2 100644
--- a/drivers/rtc/rtc-generic.c
+++ b/drivers/rtc/rtc-generic.c
@@ -38,8 +38,8 @@ static int __init generic_rtc_probe(struct platform_device *dev)
38{ 38{
39 struct rtc_device *rtc; 39 struct rtc_device *rtc;
40 40
41 rtc = rtc_device_register("rtc-generic", &dev->dev, &generic_rtc_ops, 41 rtc = devm_rtc_device_register(&dev->dev, "rtc-generic",
42 THIS_MODULE); 42 &generic_rtc_ops, THIS_MODULE);
43 if (IS_ERR(rtc)) 43 if (IS_ERR(rtc))
44 return PTR_ERR(rtc); 44 return PTR_ERR(rtc);
45 45
@@ -50,10 +50,6 @@ static int __init generic_rtc_probe(struct platform_device *dev)
50 50
51static int __exit generic_rtc_remove(struct platform_device *dev) 51static int __exit generic_rtc_remove(struct platform_device *dev)
52{ 52{
53 struct rtc_device *rtc = platform_get_drvdata(dev);
54
55 rtc_device_unregister(rtc);
56
57 return 0; 53 return 0;
58} 54}
59 55
@@ -65,18 +61,7 @@ static struct platform_driver generic_rtc_driver = {
65 .remove = __exit_p(generic_rtc_remove), 61 .remove = __exit_p(generic_rtc_remove),
66}; 62};
67 63
68static int __init generic_rtc_init(void) 64module_platform_driver_probe(generic_rtc_driver, generic_rtc_probe);
69{
70 return platform_driver_probe(&generic_rtc_driver, generic_rtc_probe);
71}
72
73static void __exit generic_rtc_fini(void)
74{
75 platform_driver_unregister(&generic_rtc_driver);
76}
77
78module_init(generic_rtc_init);
79module_exit(generic_rtc_fini);
80 65
81MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>"); 66MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>");
82MODULE_LICENSE("GPL"); 67MODULE_LICENSE("GPL");