diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-12-15 19:46:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:19:59 -0500 |
commit | 3151520d88b27b9dd4fb1c1f89a94807f0ad7ef1 (patch) | |
tree | 4a53759581236789ba294ffc3adc3256e1282b30 /Documentation/debugging-via-ohci1394.txt | |
parent | ac18eb622f4d8cdd544222e56230db850259cd37 (diff) |
rtc-stk17ta8: 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_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: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/debugging-via-ohci1394.txt')
0 files changed, 0 insertions, 0 deletions