gpio: mxc: Use helper function devm_clk_get_optional_enabled()
authorLi Zetao <lizetao1@huawei.com>
Fri, 18 Aug 2023 09:30:14 +0000 (17:30 +0800)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 21 Aug 2023 12:11:16 +0000 (14:11 +0200)
commit9e0fa5d85a4f49496e1a92889418c9d7767c1ab9
tree8a7c657f6e7f124b1a8be1e7510269287d9b3479
parent82dbbfdf8f7ecc7381ce2adb22778418d520d84c
gpio: mxc: Use helper function devm_clk_get_optional_enabled()

Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for
prepared and enabled clocks"), devm_clk_get_optional() and
clk_prepare_enable() can now be replaced by
devm_clk_get_optional_enabled() when the driver enables (and possibly
prepares) the clocks for the whole lifetime of the device. Moreover,
it is no longer necessary to unprepare and disable the clocks explicitly.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-mxc.c