Skip to content
Commit 3cbb4282 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Wim Van Sebroeck
Browse files

watchdog: at91sam9_wdt: Use the devm_clk_get_enabled() helper function



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.

Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230824135514.2661364-2-ruanjinjie@huawei.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent ce9ecca0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment