diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-parisc.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c index cb087ad407f6..ee4e9a3fb583 100644 --- a/drivers/rtc/rtc-parisc.c +++ b/drivers/rtc/rtc-parisc.c | |||
@@ -11,11 +11,6 @@ | |||
11 | 11 | ||
12 | #include <asm/rtc.h> | 12 | #include <asm/rtc.h> |
13 | 13 | ||
14 | /* as simple as can be, and no simpler. */ | ||
15 | struct parisc_rtc { | ||
16 | struct rtc_device *rtc; | ||
17 | }; | ||
18 | |||
19 | static int parisc_get_time(struct device *dev, struct rtc_time *tm) | 14 | static int parisc_get_time(struct device *dev, struct rtc_time *tm) |
20 | { | 15 | { |
21 | unsigned long ret; | 16 | unsigned long ret; |
@@ -47,16 +42,16 @@ static const struct rtc_class_ops parisc_rtc_ops = { | |||
47 | 42 | ||
48 | static int __devinit parisc_rtc_probe(struct platform_device *dev) | 43 | static int __devinit parisc_rtc_probe(struct platform_device *dev) |
49 | { | 44 | { |
50 | struct parisc_rtc *p; | 45 | struct rtc_device *p; |
51 | 46 | ||
52 | p = kzalloc(sizeof (*p), GFP_KERNEL); | 47 | p = kzalloc(sizeof (*p), GFP_KERNEL); |
53 | if (!p) | 48 | if (!p) |
54 | return -ENOMEM; | 49 | return -ENOMEM; |
55 | 50 | ||
56 | p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, | 51 | p = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, |
57 | THIS_MODULE); | 52 | THIS_MODULE); |
58 | if (IS_ERR(p->rtc)) { | 53 | if (IS_ERR(p)) { |
59 | int err = PTR_ERR(p->rtc); | 54 | int err = PTR_ERR(p); |
60 | kfree(p); | 55 | kfree(p); |
61 | return err; | 56 | return err; |
62 | } | 57 | } |
@@ -68,9 +63,9 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev) | |||
68 | 63 | ||
69 | static int __devexit parisc_rtc_remove(struct platform_device *dev) | 64 | static int __devexit parisc_rtc_remove(struct platform_device *dev) |
70 | { | 65 | { |
71 | struct parisc_rtc *p = platform_get_drvdata(dev); | 66 | struct rtc_device *p = platform_get_drvdata(dev); |
72 | 67 | ||
73 | rtc_device_unregister(p->rtc); | 68 | rtc_device_unregister(p); |
74 | kfree(p); | 69 | kfree(p); |
75 | 70 | ||
76 | return 0; | 71 | return 0; |