* [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup
@ 2024-01-10 9:01 Alexander Stein
2024-01-17 11:28 ` Sakari Ailus
2024-01-22 15:44 ` Robert Foss
0 siblings, 2 replies; 5+ messages in thread
From: Alexander Stein @ 2024-01-10 9:01 UTC (permalink / raw)
To: Hans Verkuil, Mauro Carvalho Chehab
Cc: Alexander Stein, linux-media, Robert Foss
Ensure the device has been setup correctly before registering the v4l2
async device, thus allowing userspace to access.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
---
Changes in v3:
* Added Robert's S-o-b
Change in v2:
* New approach: Register async device as last step
This superseeds the patch at [1], but has a different subject due to new
solution.
[1] https://lore.kernel.org/linux-media/20230502140612.2256850-1-alexander.stein@ew.tq-group.com/
drivers/media/i2c/tc358743.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 2785935da497b..558152575d102 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -2091,9 +2091,6 @@ static int tc358743_probe(struct i2c_client *client)
state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;
sd->dev = &client->dev;
- err = v4l2_async_register_subdev(sd);
- if (err < 0)
- goto err_hdl;
mutex_init(&state->confctl_mutex);
@@ -2151,6 +2148,10 @@ static int tc358743_probe(struct i2c_client *client)
if (err)
goto err_work_queues;
+ err = v4l2_async_register_subdev(sd);
+ if (err < 0)
+ goto err_work_queues;
+
v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
client->addr << 1, client->adapter->name);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup
2024-01-10 9:01 [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup Alexander Stein
@ 2024-01-17 11:28 ` Sakari Ailus
2024-01-17 11:29 ` Sakari Ailus
2024-01-22 15:44 ` Robert Foss
1 sibling, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2024-01-17 11:28 UTC (permalink / raw)
To: Alexander Stein
Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, Robert Foss
Hi Alexander,
On Wed, Jan 10, 2024 at 10:01:11AM +0100, Alexander Stein wrote:
> Ensure the device has been setup correctly before registering the v4l2
> async device, thus allowing userspace to access.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> Reviewed-by: Robert Foss <rfoss@kernel.org>
This should be backported to the stable trees. I'll add Cc: stable.
The patch seems to co-incidentally fix error handling, too. :-)
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup
2024-01-17 11:28 ` Sakari Ailus
@ 2024-01-17 11:29 ` Sakari Ailus
2024-01-17 12:09 ` Alexander Stein
0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2024-01-17 11:29 UTC (permalink / raw)
To: Alexander Stein
Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, Robert Foss
On Wed, Jan 17, 2024 at 11:28:03AM +0000, Sakari Ailus wrote:
> Hi Alexander,
>
> On Wed, Jan 10, 2024 at 10:01:11AM +0100, Alexander Stein wrote:
> > Ensure the device has been setup correctly before registering the v4l2
> > async device, thus allowing userspace to access.
> >
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > Reviewed-by: Robert Foss <rfoss@kernel.org>
>
> This should be backported to the stable trees. I'll add Cc: stable.
>
> The patch seems to co-incidentally fix error handling, too. :-)
I'll also add:
Fixes: 4c5211a10039 ("[media] tc358743: register v4l2 asynchronous subdevice")
--
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup
2024-01-17 11:29 ` Sakari Ailus
@ 2024-01-17 12:09 ` Alexander Stein
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2024-01-17 12:09 UTC (permalink / raw)
To: Sakari Ailus
Cc: Hans Verkuil, Mauro Carvalho Chehab, linux-media, Robert Foss
Hi Sakari,
Am Mittwoch, 17. Januar 2024, 12:29:57 CET schrieb Sakari Ailus:
> On Wed, Jan 17, 2024 at 11:28:03AM +0000, Sakari Ailus wrote:
> > Hi Alexander,
> >
> > On Wed, Jan 10, 2024 at 10:01:11AM +0100, Alexander Stein wrote:
> > > Ensure the device has been setup correctly before registering the v4l2
> > > async device, thus allowing userspace to access.
> > >
> > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > > Reviewed-by: Robert Foss <rfoss@kernel.org>
> >
> > This should be backported to the stable trees. I'll add Cc: stable.
> >
> > The patch seems to co-incidentally fix error handling, too. :-)
>
> I'll also add:
>
> Fixes: 4c5211a10039 ("[media] tc358743: register v4l2 asynchronous
> subdevice")
Agreed. Thanks
Alexander
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup
2024-01-10 9:01 [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup Alexander Stein
2024-01-17 11:28 ` Sakari Ailus
@ 2024-01-22 15:44 ` Robert Foss
1 sibling, 0 replies; 5+ messages in thread
From: Robert Foss @ 2024-01-22 15:44 UTC (permalink / raw)
To: Hans Verkuil, Alexander Stein, Mauro Carvalho Chehab; +Cc: linux-media
On Wed, 10 Jan 2024 10:01:11 +0100, Alexander Stein wrote:
> Ensure the device has been setup correctly before registering the v4l2
> async device, thus allowing userspace to access.
>
>
Applied, thanks!
[1/1] media: tc358743: register v4l2 async device only after successful setup
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=87399f1ff922
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-22 15:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 9:01 [PATCH v3 1/1] media: tc358743: register v4l2 async device only after successful setup Alexander Stein
2024-01-17 11:28 ` Sakari Ailus
2024-01-17 11:29 ` Sakari Ailus
2024-01-17 12:09 ` Alexander Stein
2024-01-22 15:44 ` Robert Foss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox