linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregor Jasny <jasny@vidsoft.de>
To: video4linux-list@redhat.com
Cc: Ted Walther <ted@enumera.com>,
	John Sokol <sokol@videotechnology.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] vivi driver works only as first device
Date: Thu, 6 Dec 2007 23:06:35 +0100	[thread overview]
Message-ID: <20071206220634.GT17496@vidsoft.de> (raw)
In-Reply-To: <20071203225610.GS17496@vidsoft.de>

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;
 }
 

       reply	other threads:[~2007-12-06 22:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071203225610.GS17496@vidsoft.de>
2007-12-06 22:06 ` Gregor Jasny [this message]
2007-12-10  7:08   ` [PATCH] vivi driver works only as first device Mauro Carvalho Chehab
2008-01-06 22:47     ` Gregor Jasny
2008-01-07  9:46       ` Mauro Carvalho Chehab

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=20071206220634.GT17496@vidsoft.de \
    --to=jasny@vidsoft.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=sokol@videotechnology.com \
    --cc=ted@enumera.com \
    --cc=video4linux-list@redhat.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;
as well as URLs for NNTP newsgroup(s).