Re: [PATCH] media: i2c: imx415: Drop redundant runtime PM callbacks
From: Michael Riesch
Date: Wed Mar 25 2026 - 15:37:15 EST
Hi Elgin, Sakari,
On 3/25/26 13:28, Sakari Ailus wrote:
> Hi Michael,
>
> On Tue, Mar 24, 2026 at 08:42:31PM +0100, Michael Riesch wrote:
>> Hi Elgin,
>>
>> Thanks for the patch but...
>>
>> On 3/24/26 13:45, Elgin Perumbilly wrote:
>>> Replace runtime_suspend/resume wrappers by using power helpers
>>> directly with DEFINE_RUNTIME_DEV_PM_OPS().
>>
>> ...why? What advantage does this refactoring bring?
>
> It looks like patch removes two redundant functions, doesn't it? :-)
Well yes. 10 lines saved. Not sure whether this was the biggest issue
with this driver -- surely it was not a big issue for me.
Elgin, I was wondering whether this change is within a certain context
or whether there is something I fail to recognize.
Anyway, if you absolutely want this change: I feel it would be nicer if
you left the imx415_runtime_{resume,suspend} and moved the bit of code
from imx415_power_{on,off} to them. Reasons for that may be mostly
aesthetical -- I claim better readability that way.
Best regards,
Michael