Re: [PATCH 02/10] iio: orientation: adapt to hid_sensor_remove_trigger() API change
From: Jonathan Cameron
Date: Tue Apr 28 2026 - 12:45:33 EST
On Tue, 28 Apr 2026 16:32:02 +0530
Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> wrote:
> On 28 April 2026 1:52:48 pm IST, Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> >On Tue, Apr 28, 2026 at 12:46:05PM +0530, Sanjay Chitroda wrote:
> >
> >> Update the driver to match the updated hid_sensor_remove_trigger()
> >> prototype, which no longer requires struct iio_dev.
> >
> >You haven't compiled the previous patch, right?
> >This is not the way how all this should be done.
> >
> >Also NAK to the patch 1 as even unused parameter is there for the sake of
> >consistency. The prototype to allocate and other in the similar group all
> >have it.
> >
> Hi Andy,
>
> Thank for the review comment.
> I agree your point for consistency.
>
> However primary object of this pre-series is to prepare the drivers for devm_ conversation.
>
> I would prepare devm_ wrapper for the hid_sensor_setup_trigger() and respective resource release hid_sensor_remove_trigger().
>
> ... devm_hid_sensor_setup_trigger( ... )
> {
> ...
> .. hid_sensor_setup_trigger();
> ....
> devm_add_action_or_release(dev, hid_sensor_remove_trigger, attrb)
> ......
> }
>
> I observed that many HID IIO drivers are not covered fully with managed API.
>
> This devm_* sensor setup trigger would use across multiple HID IIO sensors and will go step forward for managed API support.
>
Show us what that looks like with this series squashed into a single patch
as a percursor. It might be worth doing as part of that larger work - on its
own it's not justified.
A series must be applicable 1 patch at a time without breaking anything.
Jonathan