rtc: rtc-sh: Fix up oops in early periodic freq assignment.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 9 Sep 2009 03:13:01 +0000 (12:13 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 9 Sep 2009 03:13:01 +0000 (12:13 +0900)
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>
drivers/rtc/rtc-sh.c

index 39a2fcd98c2d85df814ead98b6d930c47b13b9ce..e6ed5404bca0e8d32d4623bd123c6d0b8e6a1b54 100644 (file)
@@ -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;
This page took 0.025567 seconds and 5 git commands to generate.