iio: adc: cc10001: Use devm_clk_get_enabled() to avoid boilerplate.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Oct 2022 17:09:48 +0000 (18:09 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:04 +0000 (19:44 +0000)
commitc247e0d8c0d50793f459d2a7997d2f8f2105c973
tree06aa9fb14f754f07f0cb7e642d8191e4ba7d3d3f
parentdc0ba516d103532b7f289b20119374fe3797f81b
iio: adc: cc10001: Use devm_clk_get_enabled() to avoid boilerplate.

As this driver just enables clock in probe() and disables in remove()
we can use this new function to replace boilerplate and simplify
error paths.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221016170950.387751-4-jic23@kernel.org
drivers/iio/adc/cc10001_adc.c