pinctrl: renesas: rzg2l: Use devm_clk_get_enabled() helper
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 22 Jul 2023 20:41:56 +0000 (22:41 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 25 Jul 2023 10:28:45 +0000 (12:28 +0200)
commit95eb19869401850f069723b296170b8b3bd5be9e
tree7d7c7966b8c711feedcfba2890b784472b9e2de6
parentf4b2ce40fd99ddb5c2ab9f1193454080f6714dfe
pinctrl: renesas: rzg2l: 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().

While at it, use dev_err_probe() which filters -EPROBE_DEFER.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/a4a586337d692f0ca396b80d275ba634eb419593.1690058500.git.christophe.jaillet@wanadoo.fr
[geert: Make clk local to rzg2l_pinctrl_probe()]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c