Commit 1043bf5c authored by Paul Mundt's avatar Paul Mundt

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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent e7a963ef
...@@ -283,10 +283,8 @@ static int sh_rtc_irq_set_freq(struct device *dev, int freq) ...@@ -283,10 +283,8 @@ static int sh_rtc_irq_set_freq(struct device *dev, int freq)
ret = -ENOTSUPP; ret = -ENOTSUPP;
} }
if (ret == 0) { if (ret == 0)
rtc->periodic_freq |= tmp; rtc->periodic_freq |= tmp;
rtc->rtc_dev->irq_freq = freq;
}
spin_unlock_irq(&rtc->lock); spin_unlock_irq(&rtc->lock);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment