watchdog: loongson1: Use devm_clk_get_enabled() helper
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 31 Dec 2022 11:14:30 +0000 (12:14 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 22 Apr 2023 10:53:57 +0000 (12:53 +0200)
commit07d41160b3b65c621f9352196c3791fdc7d2380d
treebd8d1774509ec8c8e2333f2811988fe2774692a3
parent8fd15ace76a4aeb3648cf078541b5e6cfc91d5a2
watchdog: loongson1: 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/624106aa86ef7e49f16b11b229528eabd63de8f7.1672485257.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/loongson1_wdt.c