Re: [PATCH v7 3/9] iio: ssp_sensors: cancel delayed work_refresh on remove
From: Jonathan Cameron
Date: Wed Apr 29 2026 - 14:10:12 EST
On Wed, 29 Apr 2026 23:36:24 +0530
Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> wrote:
> On 26 April 2026 7:39:12 pm IST, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >On Sun, 26 Apr 2026 14:47:04 +0530
> >Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> wrote:
> >
> >> From: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
> >>
> >> The work_refresh may still be pending or running when the device is
> >> removed, cancel the delayed work_refresh in remove path.
> >>
> >> Fixes: 50dd64d57eee ("iio: common: ssp_sensors: Add sensorhub driver")
> >
> >Fixes at start of patch series not after some refactors of unrelated
> >code.
>
> Hi Jonathan,
>
> Thank you for input, I will make sure to take care of this in future.
>
> Additionally, this change is independent to the initial two changes. If this change is good for the iio subtree then this would help to reduce overhead in next series.
Fair enough. Applied to the fixes-togreg branch of iio.git and
marked for stable.
Thanks,
Jonathan
>
> >
> >> Signed-off-by: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
> >> ---
> >> drivers/iio/common/ssp_sensors/ssp_dev.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
> >> index 7d07fae295fd..51730dae5871 100644
> >> --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
> >> +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
> >> @@ -590,6 +590,7 @@ static void ssp_remove(struct spi_device *spi)
> >> ssp_clean_pending_list(data);
> >>
> >> free_irq(data->spi->irq, data);
> >> + cancel_delayed_work_sync(&data->work_refresh);
> >>
> >> timer_delete_sync(&data->wdt_timer);
> >> cancel_work_sync(&data->work_wdt);
> >