watchdog: rtd119x: Use devm_clk_get_enabled() helper
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 30 Dec 2022 16:41:31 +0000 (17:41 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 12 Feb 2023 14:32:51 +0000 (15:32 +0100)
commit6cc0768ba6f5293a4435612164a2cfbf2edbd025
tree1808429461f9a18620221e990b014b71a230742c
parentf3a0dd648961f09936278752a8e9299a55f82bc5
watchdog: rtd119x: 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/14b521b821279bc5111dc80b55d0936c5767c737.1672418470.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/rtd119x_wdt.c