watchdog: bcm_kona_wdt: Convert to use device managed functions and other improvements
authorGuenter Roeck <linux@roeck-us.net>
Mon, 8 Apr 2019 19:38:31 +0000 (12:38 -0700)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 5 May 2019 19:02:16 +0000 (21:02 +0200)
commit4062ec06b7d7176870437a7a728e0a9aa3566352
tree80996a1aa5cac9efac0a415485dbbc925b94a35b
parent69656dcd4f9dbf12dc40e8d91fe0acb702777fd2
watchdog: bcm_kona_wdt: Convert to use device managed functions and other improvements

Use device managed functions to simplify error handling, reduce
source code size, improve readability, and reduce the likelyhood of bugs.
Other improvements as listed below.

The conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches

- Use local variable 'struct device *dev' consistently
- Use devm_watchdog_register_driver() to register watchdog device
- Replace shutdown function with call to watchdog_stop_on_reboot()

Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/bcm_kona_wdt.c