> -----Original Message----- > From: Jonathan Cameron <jic23@xxxxxxxxxx> > Sent: Sunday, October 16, 2022 7:10 PM > To: linux-iio@xxxxxxxxxxxxxxx > Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > Subject: [PATCH 5/5] iio: adc: cc10001: Switch remaining IIO calls in probe to > devm_ forms. > > [External] > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > As everything else is now handled by devm managed releases the > triggered buffer setup and IIO device registration can also be > moved over to their devm forms allowing dropping of remove(). > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > --- > drivers/iio/adc/cc10001_adc.c | 28 +++------------------------- > 1 file changed, 3 insertions(+), 25 deletions(-) > > diff --git a/drivers/iio/adc/cc10001_adc.c b/drivers/iio/adc/cc10001_adc.c > index b0daaec7ff16..ab71004ea8f1 100644 > --- a/drivers/iio/adc/cc10001_adc.c > +++ b/drivers/iio/adc/cc10001_adc.c > @@ -390,33 +390,12 @@ static int cc10001_adc_probe(struct > platform_device *pdev) > > mutex_init(&adc_dev->lock); > > - ret = iio_triggered_buffer_setup(indio_dev, NULL, > - &cc10001_adc_trigger_h, NULL); > + ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, > + &cc10001_adc_trigger_h, NULL); > if (ret < 0) > return ret; > > - ret = iio_device_register(indio_dev); > - if (ret < 0) > - goto err_cleanup_buffer; > - > - platform_set_drvdata(pdev, indio_dev); > - I wonder if it's obvious to everyone that removing this call as a consequence of not needing .remove() is clear enough that it does not deserve a mention in the commit message? Note that I don't find it particular important so I will still ack it and leave it up to you :) - Nuno Sá