]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: ebc-c384_wdt: Utilize devm_ functions in driver probe callback
authorWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Tue, 24 Jan 2017 22:02:33 +0000 (17:02 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 24 Feb 2017 22:00:23 +0000 (14:00 -0800)
commit0fe7afe96c1eb7dc89c020722b108b127e00a7cb
treed823ea7d647850588347553009b72e684cd92312
parentd76c2c09a7c8b791162d8d5bd42aa7d18d53aa67
watchdog: ebc-c384_wdt: Utilize devm_ functions in driver probe callback

The devm_ resource manager functions allow memory to be automatically
released when a device is unbound. This patch takes advantage of the
resource manager functions and replaces the watchdog_register_device
call with the devm_watchdog_register_device call. In addition, the
ebc_c384_wdt_remove function has been removed as no longer necessary due
to the use of the relevant devm_ resource manager functions.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/ebc-c384_wdt.c