Re: [PATCH] iio: imu: kmx61: reject duplicate event disable
From: Andy Shevchenko
Date: Fri Sep 25 2026 - 10:19:35 EST
On Fri, Sep 25, 2026 at 10:10:05PM +0800, Jiale Yao wrote:
> The IIO core does not filter duplicate writes to the event enable
> attribute. kmx61_write_event_config() already ignores repeated enable
> requests, but a repeated disable request still calls
> kmx61_set_power_state(data, false, KMX61_ACC), dropping a runtime PM
> reference that was not acquired for this request. This can underflow the
> runtime PM usage count and trigger a "Runtime PM usage count underflow"
> warning.
>
> Return early when the requested state already matches ev_enable_state.
Same comments as per previous patches of the same topic.
--
With Best Regards,
Andy Shevchenko