rtc/mc13783: protect rtc {,un}registration by mc13783 lock
authorUwe Kleine-König <[email protected]>
Fri, 5 Mar 2010 21:44:30 +0000 (13:44 -0800)
committerLinus Torvalds <[email protected]>
Sat, 6 Mar 2010 19:26:47 +0000 (11:26 -0800)
commit4c014e872e02baa5b0bde38b2b2867ccf1f9df76
treeb9e6315145e8c50b684ce532696a2082c90a987a
parent86c3400810a7a33e176bf33b6b074d881e829374
rtc/mc13783: protect rtc {,un}registration by mc13783 lock

This is to protect from interrupt handlers using an unregistered rtc
device.

To assert that the reset irq is considered now before the rtc is
registered the corresponding status is checked before.

Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Paul Gortmaker <[email protected]>
Cc: Valentin Longchamp <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Luotao Fu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/rtc/rtc-mc13783.c