watchdog: Remove BKL from rio watchdog driver
authorThomas Gleixner <tglx@linutronix.de>
Tue, 3 Nov 2009 05:16:28 +0000 (21:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Nov 2009 05:16:28 +0000 (21:16 -0800)
commit462265bf494c4f2a2f6e06480590becadecbfea7
treeab2a6a5232c2ed90bd93a350811ed7e4019ff8d8
parent49ab972aea7fca7b94f9df0f1f077fdab40a825d
watchdog: Remove BKL from rio watchdog driver

cycle_kernel_lock() was added with the BKL pushdown. The rio driver
indeed needs that because riowd_device is initialized after
misc_register(). So an open(), write/ioctl() which happens to get
between misc_register returning and riowd_device initialization would
dereference a NULL pointer.

Move riowd_device initialization before misc_register() and get rid of
cycle_kernel_lock().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/watchdog/riowd.c