watchdog: pic32-wdt: Use devm_clk_get_enabled() helper
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 31 Dec 2022 14:22:57 +0000 (15:22 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 12 Feb 2023 14:32:47 +0000 (15:32 +0100)
commit7f7f8ad0725cf31af68aaccccee6d24b8c886679
tree225a2575beb51222583fbd14ac0dfc9a98f55e8f
parenta8a9b98057458cfcbf145af647916ca9f1a63ccb
watchdog: pic32-wdt: Use devm_clk_get_enabled() helper

The devm_clk_get_enabled() helper:
   - calls devm_clk_get()
   - calls clk_prepare_enable() and registers what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids the need of a dedicated function used
with devm_add_action_or_reset().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/4335b4201b535ebc749a98bad0b99e3cb5317c39.1672496563.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/pic32-wdt.c