From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tommaso Merciai <tomm.merciai@gmail.com>
Cc: linuxfancy@googlegroups.com,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Steve Longerbeam <slongerbeam@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize
Date: Fri, 24 Nov 2023 21:06:36 +0200 [thread overview]
Message-ID: <20231124190636.GA15686@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ZWDzL+prP90gV6m2@tom-HP-ZBook-Fury-15-G7-Mobile-Workstation>
On Fri, Nov 24, 2023 at 08:02:07PM +0100, Tommaso Merciai wrote:
> On Fri, Nov 24, 2023 at 07:49:13PM +0100, Tommaso Merciai wrote:
> > After the ov5640 configurations steps let's add v4l2_subdev_init_finalize
> > that finalizes the initialization of the subdevice.
> >
> > References:
> > - https://linuxtv.org/downloads/v4l-dvb-apis/driver-api/v4l2-subdev.html
> >
> > Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
> > ---
> > drivers/media/i2c/ov5640.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index 3f79a3b77044..338eea802ab8 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -3924,6 +3924,12 @@ static int ov5640_probe(struct i2c_client *client)
> > if (ret)
> > goto entity_cleanup;
> >
> > + ret = v4l2_subdev_init_finalize(&sensor->sd);
> > + if (ret < 0) {
> > + dev_err(dev, "subdev init error: %d\n", ret);
> > + goto entity_cleanup;
> > + }
> > +
> > ret = ov5640_sensor_resume(dev);
> > if (ret) {
> > dev_err(dev, "failed to power on\n");
>
> Ignore this patch please. I forget the cleanup part.
And you also forgot the conversion to the V4L2 subdev active state API
:-) See commit e8a5b1df000e ("media: i2c: imx219: Use subdev active
state") for an example.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-11-24 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 18:49 [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize Tommaso Merciai
2023-11-24 19:02 ` Tommaso Merciai
2023-11-24 19:06 ` Laurent Pinchart [this message]
2023-11-25 9:56 ` Tommaso Merciai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231124190636.GA15686@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linuxfancy@googlegroups.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=slongerbeam@gmail.com \
--cc=tomm.merciai@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox