summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authordann frazier <dannf@hp.com>2009-03-31 22:24:50 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 15:59:24 (GMT)
commit05439f1f89aebbdb791c49e980f0f31652e4055b (patch)
treeb5febd4d45e55e14ccd804f875d2373c36452b99 /drivers/rtc
parent93d456d9802a40859ecc3d67be8c759b03aa487d (diff)
downloadlinux-05439f1f89aebbdb791c49e980f0f31652e4055b.tar.xz
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.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-parisc.c b/drivers/rtc/rtc-parisc.c
index 319bb5d..cb087ad 100644
--- a/drivers/rtc/rtc-parisc.c
+++ b/drivers/rtc/rtc-parisc.c
@@ -14,17 +14,13 @@
/* as simple as can be, and no simpler. */
struct parisc_rtc {
struct rtc_device *rtc;
- spinlock_t lock;
};
static int parisc_get_time(struct device *dev, struct rtc_time *tm)
{
- struct parisc_rtc *p = dev_get_drvdata(dev);
- unsigned long flags, ret;
+ unsigned long ret;
- spin_lock_irqsave(&p->lock, flags);
ret = get_rtc_time(tm);
- spin_unlock_irqrestore(&p->lock, flags);
if (ret & RTC_BATT_BAD)
return -EOPNOTSUPP;
@@ -34,13 +30,9 @@ static int parisc_get_time(struct device *dev, struct rtc_time *tm)
static int parisc_set_time(struct device *dev, struct rtc_time *tm)
{
- struct parisc_rtc *p = dev_get_drvdata(dev);
- unsigned long flags;
int ret;
- spin_lock_irqsave(&p->lock, flags);
ret = set_rtc_time(tm);
- spin_unlock_irqrestore(&p->lock, flags);
if (ret < 0)
return -EOPNOTSUPP;
@@ -61,8 +53,6 @@ static int __devinit parisc_rtc_probe(struct platform_device *dev)
if (!p)
return -ENOMEM;
- spin_lock_init(&p->lock);
-
p->rtc = rtc_device_register("rtc-parisc", &dev->dev, &parisc_rtc_ops,
THIS_MODULE);
if (IS_ERR(p->rtc)) {