]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: Handle multiple wm831x watchdogs being registered
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 31 May 2011 13:46:55 +0000 (14:46 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 28 Jun 2011 07:42:16 +0000 (07:42 +0000)
commite550f04e90c3806cd8e4f4c905c9ab85fe346234
treebeb4449d91329fd552cc5f23a79f3a589476d29c
parentb5cff96cc9f1cd9c0403c1b0973a5e6ad98c87f2
watchdog: Handle multiple wm831x watchdogs being registered

Due to the whole single instance based watchdog API we use static data
for the wm831x watchdog which means that if the system tries to register
a second one we end up trying to register the same miscdevice again,
corrupting the miscdevice list. Work around this by checking for duplicate
registrations until we get a watchdog core.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/wm831x_wdt.c