watchdog: s3c2410_wdt: Use devm_clk_get[_optional]_enabled() helpers
authorGuenter Roeck <linux@roeck-us.net>
Sat, 4 Mar 2023 16:56:52 +0000 (08:56 -0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 22 Apr 2023 10:53:39 +0000 (12:53 +0200)
commit9b31b1ea125ca2e734ae89badc0c3073b4445842
treef35f21380a6d6726d8dbad41176505dc1328ec37
parent12cee6efb7b94918747d09ba7488dd5cb1bbe2be
watchdog: s3c2410_wdt: Use devm_clk_get[_optional]_enabled() helpers

The devm_clk_get[_optional]_enabled() helpers:
    - call devm_clk_get[_optional]()
    - call clk_prepare_enable() and register what is needed in order to
      call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids the calls to clk_disable_unprepare().

While at it, use dev_err_probe consistently, and use its return value
to return the error code.

Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304165653.2179835-1-linux@roeck-us.net
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/s3c2410_wdt.c