diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-12-16 01:45:58 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 16:19:59 +0100 |
commit | ba4f3e47cb9ef72f864f1b5548688e0a195011e9 (patch) | |
tree | 1a115124e4923e85754c28c8773be67b586ec5b9 /tools/perf | |
parent | rtc-cmos: convert RTC_AIE/RTC_UIE to rtc irq API (diff) | |
download | linux-ba4f3e47cb9ef72f864f1b5548688e0a195011e9.tar.xz linux-ba4f3e47cb9ef72f864f1b5548688e0a195011e9.zip |
rtc-ds1511: fix races around device registration
- Call dev_set_drvdata before rtc device creation.
- Use its own spinlock instead of rtc->irq_lock. Because pdata->rtc
must be initialized to use the irq_lock (pdata->rtc->irq_lock). There
is a small window which rtc methods can be called before pdata->rtc is
initialized.
And there is no need use the irq_lock to protect hardware registers.
The driver's own spinlock shoule be enough.
- Check pdata->rtc before calling rtc_update_irq.
- Use {alarm,update}_irq_enable and remove ioctl routine.
- Use devres APIs and simplify error/remove path.
These fixes are ported from ds1553 driver and just compile-tested only.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Andrew Sharp <andy.sharp@lsi.com>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions