mbox series

[-next,v2,0/2] iio: adc: spear_adc: Simplify with device managed function

Message ID 20230826062733.3714169-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series iio: adc: spear_adc: Simplify with device managed function | expand

Message

Jinjie Ruan Aug. 26, 2023, 6:27 a.m. UTC
Commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared
and enabled clocks") provides a new helper function to prepare and
enable a clock which keeps prepared (or enabled) during the whole
lifetime of the driver.

Switch to devm_iio_device_register() and drop the remove function.

Use the dev_err_probe() helper to simplify error handling during probe.
This also handle scenario, when EDEFER is returned and useless
error is printed.

Changes in v2:
- Switch to devm_iio_device_register() and drop the remove function.
- Use the dev_err_probe() helper to simplify code.

Jinjie Ruan (2):
  iio: adc: spear_adc: Use device managed function
  iio: adc: spear_adc: Use dev_err_probe()

 drivers/iio/adc/spear_adc.c | 61 ++++++++-----------------------------
 1 file changed, 13 insertions(+), 48 deletions(-)