Re: [PATCH v5 next 0/7] IIO: sca3000: devm resource management

Andy Shevchenko
2026-02-05T16:30:20Z

On Thu, Feb 05, 2026 at 05:12:06AM -0800, Harshit Mogalapalli wrote:
> This is an attempt to update sca3000 accelerometer driver to make use
> of devm_ based helpers where needed. I have split it into 6 patches.
>
> Patch 1 - some refactoring and simplification of dev.
> Patch 2 - switches request_threaded_irq() over to the devm helper
> {atch 3 - Move stop_all_interrupts() above probe
> Patch 4 - make stop_all_interrupts() return void
> Patch 5 - Make use of guard() in sca3000_stop_all_interrupts() function.
> Patch 6 - Used devm_add_action_or_reset() for disabling interrupts.
> (Ensured the ordering of teardown bits remain same)
> Patch 7 - manage device registration with devm helper
>
> Yet to be addressed tasks: (Would like to take this up as a separate
> activity)
> 1. We shouldn't be using the spi_device_id at all. [Thanks to onathan
> and David]
> 2. Modernize other functions to make use of autocleanup style locking
> which simpifies the code and makes error paths cleaner.
>
> I will be working on these two above tasks and will be sending a
> different patches for those.
>
> The series builds cleanly and I have performed static analysis with
> smatch checker but haven't tested on actual hardware.

LGTM, but there are a couple of things I noticed while going thru the patches
again. They maybe addressed later, or if, Jonathan asks, in the next version.

--
With Best Regards,
Andy Shevchenko