watchdog: Create watchdog device in watchdog_dev.c
authorGuenter Roeck <linux@roeck-us.net>
Sat, 26 Dec 2015 00:01:40 +0000 (16:01 -0800)
committerWim Van Sebroeck <wim@iguana.be>
Tue, 29 Dec 2015 19:36:01 +0000 (20:36 +0100)
commit32ecc6392654a0db34b310e8924b5b2c3b8bf503
treeaeaeef6cab16c422f140ae7887c84a34231dbe51
parent0933b453f1c7104d873aacf8524f8ac380a7ed08
watchdog: Create watchdog device in watchdog_dev.c

The watchdog character device is currently created in watchdog_dev.c,
and the watchdog device in watchdog_core.c. This results in
cross-dependencies, since device creation needs to know the watchdog
character device number as well as the watchdog class, both of which
reside in watchdog_dev.c.

Create the watchdog device in watchdog_dev.c to simplify the code.

Inspired by earlier patch set from Damien Riegel.

Cc: Damien Riegel <damien.riegel@savoirfairelinux.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/watchdog_core.c
drivers/watchdog/watchdog_core.h
drivers/watchdog/watchdog_dev.c