lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZWHEyTSnbuhH1Xdu@tom-HP-ZBook-Fury-15-G7-Mobile-Workstation>
Date:   Sat, 25 Nov 2023 10:56:25 +0100
From:   Tommaso Merciai <tomm.merciai@...il.com>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     linuxfancy@...glegroups.com,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Steve Longerbeam <slongerbeam@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: ov5640: add missing v4l2_subdev_init_finalize

Hi Laurent,

On Fri, Nov 24, 2023 at 09:06:36PM +0200, Laurent Pinchart wrote:
> 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@...il.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.

Yup, thanks mb :'(
Thanks for sharing this :)

> 
> -- 
> Regards,
> 
> Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ