lkml.org 
[lkml]   [2007]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] vivi driver works only as first device
From
From: Gregor Jasny <gjasny@web.de>

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.

Signed-off-by: Gregor Jasny <gjasny@web.de>
---
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index ee73dc7..f4e533a 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -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;
}


\
 
 \ /
  Last update: 2007-12-06 23:39    [W:0.046 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site