Re: [PATCH v3 5/8] iio: tcs3472: use devm for resource management
Jonathan Cameron <[email protected]>
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260526140024.3e422667@jic23-huawei> |
On Fri, 22 May 2026 14:34:16 +0200 Aldo Conte <[email protected]> wrote: > Convert the driver to use device-managed resource allocation: > - Add tcs3472_powerdown_action() and register it with > devm_add_action_or_reset() to ensure the device is powered down on > cleanup. > - Replace iio_triggered_buffer_setup() with > devm_iio_triggered_buffer_setup(). > - Replace request_threaded_irq() with devm_request_threaded_irq(). > - Replace iio_device_register() with devm_iio_device_register(). > - Replace mutex_init() with devm_mutex_init(). > - Remove tcs3472_remove() as all cleanup is now handled by devm. > > Use a local 'dev = &client->dev' in tcs3472_probe() to keep the devm > calls compact. > > Signed-off-by: Aldo Conte <[email protected]> Applied to the testing branch of iio.git. Thanks, Jonathan