rtc-tx4939: fix races around device registration
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Wed, 16 Dec 2009 00:46:00 +0000 (16:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:19:59 +0000 (07:19 -0800)
commitaf69a180e0675ce95842adb519079204ee5647ea
tree138b271a928e8715611393fb779251110bc6aa22
parentba4f3e47cb9ef72f864f1b5548688e0a195011e9
rtc-tx4939: fix races around device registration

* Use its own spinlock instead of rtc->irq_lock
* Check pdata->rtc before calling rtc_update_irq
* Disable interrupt after rtc_device_unregister

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
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>
drivers/rtc/rtc-tx4939.c