Skip to content
Commit 9b31b1ea authored by Guenter Roeck's avatar Guenter Roeck Committed by Wim Van Sebroeck
Browse files

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: default avatarGuenter Roeck <linux@roeck-us.net>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304165653.2179835-1-linux@roeck-us.net


Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent 12cee6ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment