summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-09-09 12:13:01 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-09-09 12:13:01 +0900
commit1043bf5c95cf065c9959c2733d6e868f9806eb66 (patch)
tree8272a12e7d6205edc622cce3b28a4f7d0b7bc107 /drivers/rtc
parente7a963ef20cabde53d0e609737764ddc65f4605a (diff)
downloadlinux-1043bf5c95cf065c9959c2733d6e868f9806eb66.tar.bz2
rtc: rtc-sh: Fix up oops in early periodic freq assignment.
With the reordered init order, the rtc device is not registered until later, while sh_rtc_irq_set_freq() was attempting to assign ->irq_freq directly, resulting in an oops. This is handled by the upper layers for us, so just kill off the problematic dereference completely. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-sh.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index 39a2fcd98c2d..e6ed5404bca0 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -283,10 +283,8 @@ static int sh_rtc_irq_set_freq(struct device *dev, int freq)
ret = -ENOTSUPP;
}
- if (ret == 0) {
+ if (ret == 0)
rtc->periodic_freq |= tmp;
- rtc->rtc_dev->irq_freq = freq;
- }
spin_unlock_irq(&rtc->lock);
return ret;