Re: [PATCH] media: ov5648: Fix order of a call to pm_runtime_set_suspended
From: Ondřej Jirman
Date: Mon Jul 27 2026 - 18:46:56 EST
Hello Sakari,
On Sun, Jul 26, 2026 at 01:20:43AM +0300, Sakari Ailus wrote:
> Hi Ondřej,
>
> Thanks for the patch.
>
> On Sat, Jul 25, 2026 at 02:05:52PM +0200, Ondřej Jirman wrote:
> > From: Ondrej Jirman <megi@xxxxxx>
> >
> > It should be done when RPM is disabled.
> >
> > Signed-off-by: Ondrej Jirman <megi@xxxxxx>
> > ---
> > drivers/media/i2c/ov5648.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
> > index f0b839cd65f1..0643440a6f5d 100644
> > --- a/drivers/media/i2c/ov5648.c
> > +++ b/drivers/media/i2c/ov5648.c
> > @@ -2566,8 +2566,8 @@ static int ov5648_probe(struct i2c_client *client)
> >
> > /* Runtime PM */
> >
> > - pm_runtime_enable(sensor->dev);
> > pm_runtime_set_suspended(sensor->dev);
> > + pm_runtime_enable(sensor->dev);
>
> Runtime PM API usage in this driver appears to be very broken. :-( I guess
> it got merged just before we started paying more attention to Runtime PM as
> a whole. Either way, feel free to fix this all, I could provide a patch as
> well (but can't test it).
Ok, I'll review this more thoroughly. :)
Best regards,
o.
> >
> > /* V4L2 subdev register */
> >
>
> --
> Kind regards,
>
> Sakari Ailus