diff options
author | dann frazier <dannf@hp.com> | 2009-03-31 18:24:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:25 -0400 |
commit | 2b93cff4dc184bf7b4858dc7a9bd2e8d33c1a3eb (patch) | |
tree | 4a07200a2a3e3b4f9b6adaab121e05f73bc71aef /drivers/rtc | |
parent | f62bacd4d48a1a6b8931a0140fb2324a06dd89fe (diff) |
rtc-parisc: use platform_driver_probe
This isn't a hotpluggable device, so call platform_driver_probe
directly in parisc_rtc_init
Signed-off-by: dann frazier <dannf@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-parisc.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c index 0477cc129c6d..a2ca07ad42cb 100644 --- a/drivers/rtc/rtc-parisc.c +++ b/drivers/rtc/rtc-parisc.c | |||
@@ -40,19 +40,14 @@ static const struct rtc_class_ops parisc_rtc_ops = { | |||
40 | .set_time = parisc_set_time, | 40 | .set_time = parisc_set_time, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static int __devinit parisc_rtc_probe(struct platform_device *dev) | 43 | static int __init parisc_rtc_probe(struct platform_device *dev) |
44 | { | 44 | { |
45 | struct rtc_device *p; | 45 | struct rtc_device *p; |
46 | 46 | ||
47 | p = kzalloc(sizeof (*p), GFP_KERNEL); | ||
48 | if (!p) | ||
49 | return -ENOMEM; | ||
50 | |||
51 | p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, | 47 | p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, |
52 | THIS_MODULE); | 48 | THIS_MODULE); |
53 | if (IS_ERR(p)) { | 49 | if (IS_ERR(p)) { |
54 | int err = PTR_ERR(p); | 50 | int err = PTR_ERR(p); |
55 | kfree(p); | ||
56 | return err; | 51 | return err; |
57 | } | 52 | } |
58 | 53 | ||
@@ -61,12 +56,11 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev) | |||
61 | return 0; | 56 | return 0; |
62 | } | 57 | } |
63 | 58 | ||
64 | static int __devexit parisc_rtc_remove(struct platform_device *dev) | 59 | static int __exit parisc_rtc_remove(struct platform_device *dev) |
65 | { | 60 | { |
66 | struct rtc_device *p = platform_get_drvdata(dev); | 61 | struct rtc_device *p = platform_get_drvdata(dev); |
67 | 62 | ||
68 | rtc_device_unregister(p); | 63 | rtc_device_unregister(p); |
69 | kfree(p); | ||
70 | 64 | ||
71 | return 0; | 65 | return 0; |
72 | } | 66 | } |
@@ -82,7 +76,7 @@ static struct platform_driver parisc_rtc_driver = { | |||
82 | 76 | ||
83 | static int __init parisc_rtc_init(void) | 77 | static int __init parisc_rtc_init(void) |
84 | { | 78 | { |
85 | return platform_driver_register(&parisc_rtc_driver); | 79 | return platform_driver_probe(&parisc_rtc_driver, parisc_rtc_probe); |
86 | } | 80 | } |
87 | 81 | ||
88 | static void __exit parisc_rtc_fini(void) | 82 | static void __exit parisc_rtc_fini(void) |