On Thu, Aug 26, 2021 at 08:28:08PM +0200, Christophe JAILLET wrote:
@@ -172,13 +167,23 @@ static int adc128_probe(struct spi_device *spi)
ret = regulator_enable(adc->reg);
if (ret < 0)
return ret;
- ret = devm_add_action_or_reset(&spi->dev, adc128_disable_regulator, adc->reg);
- if (ret)
- return ret;
mutex_init(&adc->lock);
- return devm_iio_device_register(&spi->dev, indio_dev);
+ ret = iio_device_register(indio_dev);
+
+ return ret;
Since you're resending anyway then please do:
return iio_device_register(indio_dev);
regards,
dan carpenter