Re: [PATCH v8 01/12] iio: ssp_sensors: cancel delayed work_refresh on remove

From: Jonathan Cameron

Date: Sun May 17 2026 - 08:34:44 EST


On Sun, 17 May 2026 13:31:22 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Fri, May 15, 2026 at 11:10:06PM +0530, Sanjay Chitroda wrote:
>
> > The work_refresh may still be pending or running when the device is
> > removed, cancel the delayed work_refresh in remove path.
>
> ...
>
> > free_irq(data->spi->irq, data);
> > + cancel_delayed_work_sync(&data->work_refresh);
>
> In another thread it was (is) a discussion about cancel_ vs. disable_.
> I.o.w. the Q is can anything trigger (schedule) a new work after this point?
> For example, some user space sysfs node or other means of ABI.
>
Or maybe avoid us having to think about that and use disable_ on tear
down paths :)


> > timer_delete_sync(&data->wdt_timer);
> > cancel_work_sync(&data->work_wdt);
>