This is a note to let you know that I've just added the patch titled iio:adc:ad7476: Fix remove handling to the 5.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-adc-ad7476-fix-remove-handling.patch and it can be found in the queue-5.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6baee4bd63f5fdf1716f88e95c21a683e94fe30d Mon Sep 17 00:00:00 2001 From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Date: Thu, 1 Apr 2021 18:17:57 +0100 Subject: iio:adc:ad7476: Fix remove handling From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> commit 6baee4bd63f5fdf1716f88e95c21a683e94fe30d upstream. This driver was in an odd half way state between devm based cleanup and manual cleanup (most of which was missing). I would guess something went wrong with a rebase or similar. Anyhow, this basically finishes the job as a precursor to improving the regulator handling. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Fixes: 4bb2b8f94ace3 ("iio: adc: ad7476: implement devm_add_action_or_reset") Cc: Michael Hennerich <michael.hennerich@xxxxxxxxxx> Reviewed-by: Alexandru Ardelean <ardeleanalex@xxxxxxxxx> Cc: <Stable@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210401171759.318140-2-jic23@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/iio/adc/ad7476.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) --- a/drivers/iio/adc/ad7476.c +++ b/drivers/iio/adc/ad7476.c @@ -321,25 +321,15 @@ static int ad7476_probe(struct spi_devic spi_message_init(&st->msg); spi_message_add_tail(&st->xfer, &st->msg); - ret = iio_triggered_buffer_setup(indio_dev, NULL, - &ad7476_trigger_handler, NULL); + ret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev, NULL, + &ad7476_trigger_handler, NULL); if (ret) - goto error_disable_reg; + return ret; if (st->chip_info->reset) st->chip_info->reset(st); - ret = iio_device_register(indio_dev); - if (ret) - goto error_ring_unregister; - return 0; - -error_ring_unregister: - iio_triggered_buffer_cleanup(indio_dev); -error_disable_reg: - regulator_disable(st->reg); - - return ret; + return devm_iio_device_register(&spi->dev, indio_dev); } static const struct spi_device_id ad7476_id[] = { Patches currently in stable-queue which might be from Jonathan.Cameron@xxxxxxxxxx are queue-5.12/iio-adc-ad7476-fix-remove-handling.patch queue-5.12/iio-magnetometer-yas530-include-right-header.patch queue-5.12/iio-accel-adis16201-fix-wrong-axis-assignment-that-prevents-loading.patch queue-5.12/iio-hid-sensor-rotation-fix-quaternion-data-not-correct.patch queue-5.12/iio-inv_mpu6050-fully-validate-gyro-and-accel-scale-writes.patch queue-5.12/iio-sx9310-fix-access-to-variable-dt-array.patch queue-5.12/iio-sx9310-fix-write_.._debounce.patch queue-5.12/iio-magnetometer-yas530-fix-return-value-on-error-path.patch