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.brSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment