[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260203122109.689669-1-harshit.m.mogalapalli@oracle.com>
Date: Tue, 3 Feb 2026 04:20:44 -0800
From: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
To: Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
Andrew Ijano <andrew.ijano@...il.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, error27@...il.com,
andriy.shevchenko@...el.com
Subject: [PATCH v3 next 0/6] IIO: sca3000: devm resource management
Hi,
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 spi_device.
Patch 2 - some refactoring and simplification of dev.
Patch 2 - switches request_threaded_irq() over to the devm helper
Patch 3 - Used devm_add_action_or_reset() for disabling interrupts.
(Ensured the ordering of teardown bits remain same)
Patch 4 - manage device registration with devm helper
Patch 5 - Make use of guard() in sca3000_stop_all_interrupts() function.
Thanks to David and Jonathan for reviewing v1 and v2.
Yet to be addressed tasks:
1. We shouldn't be using the spi_device_id at all. [Thanks to onathan
and David]
2. Modernize other fucntions 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.
v1 -> v2: changes are documented in patches where necessary.
v2 -> v3: Address comments from David Lechner.
Thanks for your time.
Regards,
Harshit
Harshit Mogalapalli (6):
iio: sca3000: cache SPI device ID in probe
iio: sca3000: reuse device pointer for devm helpers
iio: sca3000: switch IRQ handling to devm helpers
iio: sca3000: stop interrupts via devm_add_action_or_reset()
iio: sca3000: manage device registration with devm helper
iio: sca3000: use guard(mutex) to simplify return paths
drivers/iio/accel/sca3000.c | 91 +++++++++++++++----------------------
1 file changed, 36 insertions(+), 55 deletions(-)
--
2.47.3
Powered by blists - more mailing lists