ata: pata_imx: Use helper function devm_clk_get_enabled()
authorLi Zetao <lizetao1@huawei.com>
Tue, 15 Aug 2023 15:13:52 +0000 (23:13 +0800)
committerDamien Le Moal <dlemoal@kernel.org>
Wed, 16 Aug 2023 22:45:32 +0000 (07:45 +0900)
commit0e1bd497ca372031b5aa37fdffc5cf6d3a796343
tree09c3029f89b829d13dfca92556e8cec2973e6bf0
parentcaea958926c33c72fd1c91b892feca82314e27e5
ata: pata_imx: Use helper function devm_clk_get_enabled()

After the commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for
prepared and enabled clocks"), the pair of functions devm_clk_get() and
clk_prepare_enable() can be replaced with the single function
devm_clk_get_enabled(). Moreover, the driver will keep the clock
prepared (or enabled) during the whole lifetime of the device, so it is
unnecessary to unprepare and disable the clock explicitly when removing
the device or in the error handling path.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
drivers/ata/pata_imx.c