]> git.baikalelectronics.ru Git - kernel.git/commit
iio: imu: adis16480: Improve getting the optional clocks
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 14 Apr 2022 13:15:59 +0000 (16:15 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 28 Apr 2022 18:22:56 +0000 (19:22 +0100)
commit093e7036e3c0e79979d50acd8d683da68a7702d5
tree628d38340e83d8b775d1215a728bf98c9edb94b9
parentf5cf19181480bffe53b200be58056e58c3956013
iio: imu: adis16480: Improve getting the optional clocks

The extended clocks are optional and may not be present for some
configurations supported by this driver. Nevertheless, in case
the clock is provided but some error happens during its getting,
that error handling should be done properly.

Use devm_clk_get_optional() API and report possible errors using
dev_err_probe() to handle properly -EPROBE_DEFER error.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Tested-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220414131559.24694-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16480.c