iio: adc: lpc18xx_adc: Reorder clk_get_rate() function call
authorAndré Gustavo Nakagomi Lopez <andregnl@usp.br>
Mon, 25 Oct 2021 12:19:50 +0000 (09:19 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:31 +0000 (17:51 +0000)
commit8eebe6281ac1062764db23d181e3feb3305a3690
tree74eb8d30562aad6d182234baaa4f9b32e6e397c4
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
iio: adc: lpc18xx_adc: Reorder clk_get_rate() function call

clk_get_rate() is not guaranteed to work if called before
clk_prepare_enable().

Reorder clk_get_rate(), so it's called after clk_prepare_enable() and
after devm_add_action_or_reset() of lpc18xx_clk_disable().

Not that this is not a problem on this particular device, but it is
good to remove a case that might get copied elsewhere.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: André Gustavo Nakagomi Lopez <andregnl@usp.br>
Link: https://lore.kernel.org/r/YXag5l4xBkGQH3tq@Andryuu.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/lpc18xx_adc.c