Skip to contentSkip to conversation

vivi driver works only as first device

PATCH In review Gregor Jasny 3 participants 4 messages Dec 6, 2007 – Jan 7, 2008 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 vivi driver works only as first device

In reply to a message not in the archive

From: Gregor Jasny <[email protected]>

When the vivi driver allocates a video device, video_register_device() stores the allocated device minor inside the vivi structure. But when the device node is opened, the file minor number is compared to the minor in the device list. So this patch copies the allocated minor in the device list, too.

Without this patch it is impossible to use the vivi driver mith minors greater than zero.

---

drivers/media/video/vivi.c +3 -0
index ee73dc7..f4e533a 100644
@@ -1175,6 +1175,9 @@ static int __init vivi_init(void)
 
 	ret = video_register_device(&vivi, VFL_TYPE_GRABBER, video_nr);
 	printk(KERN_INFO "Video Technology Magazine Virtual Video Capture Board (Load status: %d)\n", ret);
+
+	dev->vfd.minor = vivi.minor;
+
 	return ret;
 }
 
#2 lore raw

Hi Gregor,
Em Qui, 2007-12-06 às 23:06 +0100, Gregor Jasny escreveu:

Quoted 6 lines

From: Gregor Jasny <[email protected]>

When the vivi driver allocates a video device, video_register_device() stores the allocated device minor inside the vivi structure. But when the device node is opened, the file minor number is compared to the minor in the device list. So this patch copies the allocated minor in the device list, too.

Thanks for the report. Instead of applying your patch, I decided to better analyze the issue, fixing it with the proper solution. The issue is that vivi_register changes iminor, but this change were not properly returned to the driver.

Signature · 2 lines
Cheers,
Mauro
#3 lore raw
Quoted 4 lines · Mauro Carvalho Chehab

Thanks for the report. Instead of applying your patch, I decided to better analyze the issue, fixing it with the proper solution. The issue is that vivi_register changes iminor, but this change were not properly returned to the driver.

Any chance to push this into 2.6.24?

Gregor

#4 lore raw
Quoted 7 lines · On Sun, 6 Jan 2008 23:47:19 +0100 "Gregor Jasny" <[email protected]> wrote:
Quoted 4 lines · Mauro Carvalho Chehab

Thanks for the report. Instead of applying your patch, I decided to better analyze the issue, fixing it with the proper solution. The issue is that vivi_register changes iminor, but this change were not properly returned to the driver.

Any chance to push this into 2.6.24?

I've scheduled this patch for inclusion at 2.6.25-rc.

Cheers,
Mauro