mbox series

[-next,0/3] watchdog: Use the devm_clk_get_enabled() helper function

Message ID 20230824135450.2661312-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series watchdog: Use the devm_clk_get_enabled() helper function | expand

Message

Jinjie Ruan Aug. 24, 2023, 1:54 p.m. UTC
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().

Jinjie Ruan (3):
  watchdog: at91sam9_wdt: Use the devm_clk_get_enabled() helper function
  watchdog: ath79_wdt: Use the devm_clk_get_enabled() helper function
  watchdog: sunplus: Use the devm_clk_get_enabled() helper function

 drivers/watchdog/at91sam9_wdt.c | 20 +++++---------------
 drivers/watchdog/ath79_wdt.c    | 19 ++++---------------
 drivers/watchdog/sunplus_wdt.c  | 17 ++---------------
 3 files changed, 11 insertions(+), 45 deletions(-)