diff options
author | dann frazier <dannf@hp.com> | 2009-03-31 18:24:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:24 -0400 |
commit | 05439f1f89aebbdb791c49e980f0f31652e4055b (patch) | |
tree | b5febd4d45e55e14ccd804f875d2373c36452b99 /drivers/rtc | |
parent | 93d456d9802a40859ecc3d67be8c759b03aa487d (diff) |
rtc-parisc: remove redundant locking
The RTC subsystem proides ops locking, no need to implement our own
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, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c index 319bb5d445ea..cb087ad407f6 100644 --- a/drivers/rtc/rtc-parisc.c +++ b/drivers/rtc/rtc-parisc.c | |||
@@ -14,17 +14,13 @@ | |||
14 | /* as simple as can be, and no simpler. */ | 14 | /* as simple as can be, and no simpler. */ |
15 | struct parisc_rtc { | 15 | struct parisc_rtc { |
16 | struct rtc_device *rtc; | 16 | struct rtc_device *rtc; |
17 | spinlock_t lock; | ||
18 | }; | 17 | }; |
19 | 18 | ||
20 | static int parisc_get_time(struct device *dev, struct rtc_time *tm) | 19 | static int parisc_get_time(struct device *dev, struct rtc_time *tm) |
21 | { | 20 | { |
22 | struct parisc_rtc *p = dev_get_drvdata(dev); | 21 | unsigned long ret; |
23 | unsigned long flags, ret; | ||
24 | 22 | ||
25 | spin_lock_irqsave(&p->lock, flags); | ||
26 | ret = get_rtc_time(tm); | 23 | ret = get_rtc_time(tm); |
27 | spin_unlock_irqrestore(&p->lock, flags); | ||
28 | 24 | ||
29 | if (ret & RTC_BATT_BAD) | 25 | if (ret & RTC_BATT_BAD) |
30 | return -EOPNOTSUPP; | 26 | return -EOPNOTSUPP; |
@@ -34,13 +30,9 @@ static int parisc_get_time(struct device *dev, struct rtc_time *tm) | |||
34 | 30 | ||
35 | static int parisc_set_time(struct device *dev, struct rtc_time *tm) | 31 | static int parisc_set_time(struct device *dev, struct rtc_time *tm) |
36 | { | 32 | { |
37 | struct parisc_rtc *p = dev_get_drvdata(dev); | ||
38 | unsigned long flags; | ||
39 | int ret; | 33 | int ret; |
40 | 34 | ||
41 | spin_lock_irqsave(&p->lock, flags); | ||
42 | ret = set_rtc_time(tm); | 35 | ret = set_rtc_time(tm); |
43 | spin_unlock_irqrestore(&p->lock, flags); | ||
44 | 36 | ||
45 | if (ret < 0) | 37 | if (ret < 0) |
46 | return -EOPNOTSUPP; | 38 | return -EOPNOTSUPP; |
@@ -61,8 +53,6 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev) | |||
61 | if (!p) | 53 | if (!p) |
62 | return -ENOMEM; | 54 | return -ENOMEM; |
63 | 55 | ||
64 | spin_lock_init(&p->lock); | ||
65 | |||
66 | p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, | 56 | p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops, |
67 | THIS_MODULE); | 57 | THIS_MODULE); |
68 | if (IS_ERR(p->rtc)) { | 58 | if (IS_ERR(p->rtc)) { |