From 1043bf5c95cf065c9959c2733d6e868f9806eb66 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 9 Sep 2009 12:13:01 +0900 Subject: 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 Signed-off-by: Paul Mundt --- drivers/rtc/rtc-sh.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/rtc/rtc-sh.c') diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index 39a2fcd98c2..e6ed5404bca 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; -- cgit v1.2.3