public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] add video_nr module param to gspca
@ 2009-01-10 18:53 Stas Sergeev
  2009-01-11 19:25 ` Jean-Francois Moine
  2009-01-11 23:19 ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 5+ messages in thread
From: Stas Sergeev @ 2009-01-10 18:53 UTC (permalink / raw)
  To: Linux and Kernel Video

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

Hi.

The attached patch adds the
module_param for video_nr to
the gspca driver.
The patch is completely untested
as I don't use any webcam myself.
Its just that a friend of mine
complained about an inability to
set the device number for gspca
and I hope this patch can solve
that problem.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>

[-- Attachment #2: gspca_nr.diff --]
[-- Type: text/x-patch, Size: 423 bytes --]

--- a/drivers/media/video/gspca/gspca.c	2008-12-06 23:39:56.000000000 +0300
+++ b/drivers/media/video/gspca/gspca.c	2009-01-10 19:29:49.000000000 +0300
@@ -48,6 +48,8 @@
 #define DRIVER_VERSION_NUMBER	KERNEL_VERSION(2, 3, 0)
 
 static int video_nr = -1;
+module_param(video_nr, int, 0);
+MODULE_PARM_DESC(video_nr, "video device to register (0=/dev/video0, etc)");
 
 #ifdef GSPCA_DEBUG
 int gspca_debug = D_ERR | D_PROBE;

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] add video_nr module param to gspca
  2009-01-10 18:53 [patch] add video_nr module param to gspca Stas Sergeev
@ 2009-01-11 19:25 ` Jean-Francois Moine
  2009-01-11 20:17   ` Stas Sergeev
  2009-01-11 23:19 ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 5+ messages in thread
From: Jean-Francois Moine @ 2009-01-11 19:25 UTC (permalink / raw)
  To: Stas Sergeev; +Cc: Linux and Kernel Video

On Sat, 10 Jan 2009 21:53:14 +0300
Stas Sergeev <stsp@aknet.ru> wrote:

> Hi.
> 
> The attached patch adds the
> module_param for video_nr to
> the gspca driver.
> The patch is completely untested
> as I don't use any webcam myself.
> Its just that a friend of mine
> complained about an inability to
> set the device number for gspca
> and I hope this patch can solve
> that problem.

Hi,

I don't think such a patch is usefull.

Instead, as every system runs udev, it is simpler to add a rule as:

  ATTRS{idVendor}=="05e1",ATTRS{idProduct}=="0893",NAME="video3"

Best regards.

-- 
Ken ar c'hentan	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] add video_nr module param to gspca
  2009-01-11 19:25 ` Jean-Francois Moine
@ 2009-01-11 20:17   ` Stas Sergeev
       [not found]     ` <20090112085103.0e84305a@free.fr>
  0 siblings, 1 reply; 5+ messages in thread
From: Stas Sergeev @ 2009-01-11 20:17 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: Linux and Kernel Video

Hello.

Jean-Francois Moine wrote:
> I don't think such a patch is usefull.
> Instead, as every system runs udev, it is simpler to add a rule as:
>   ATTRS{idVendor}=="05e1",ATTRS{idProduct}=="0893",NAME="video3"
Other drivers do have that modparam,
namely, I copy/pasted from cpia2_v4l.c.
So I thought it would be a good idea
to have it at least for consistency,
but thanks for the udev hint!

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] add video_nr module param to gspca
  2009-01-10 18:53 [patch] add video_nr module param to gspca Stas Sergeev
  2009-01-11 19:25 ` Jean-Francois Moine
@ 2009-01-11 23:19 ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2009-01-11 23:19 UTC (permalink / raw)
  To: Stas Sergeev; +Cc: Linux and Kernel Video, Linux Media Mailing List

Hi Stas,

Please, always copy linux-media@vger.kernel.org for patches and other subjects
related to drivers development. This will allow patchwork.kernel.org to
properly track the sent patches.

Cheers,
Mauro.

On Sat, 10 Jan 2009 21:53:14 +0300
Stas Sergeev <stsp@aknet.ru> wrote:

> Hi.
> 
> The attached patch adds the
> module_param for video_nr to
> the gspca driver.
> The patch is completely untested
> as I don't use any webcam myself.
> Its just that a friend of mine
> complained about an inability to
> set the device number for gspca
> and I hope this patch can solve
> that problem.
> 
> Signed-off-by: Stas Sergeev <stsp@aknet.ru>




Cheers,
Mauro

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] add video_nr module param to gspca
       [not found]     ` <20090112085103.0e84305a@free.fr>
@ 2009-01-12 10:51       ` Stas Sergeev
  0 siblings, 0 replies; 5+ messages in thread
From: Stas Sergeev @ 2009-01-12 10:51 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: linux-media@vger.kernel.org

Hi.

Jean-Francois Moine wrote:
> Looking at the video drivers, I found that only half of these ones have
> this parameter. Then, I think it should be better to remove it
> everywhere!
OK, that might be a solution too. :)

> In fact, setting the video number in the right driver before plugging
> any video device is rather complicated while setting udev rules is easy
> and has to be done only once...
No, its not like that. You only add the
strings like
options gspca video_nr=1
in your /etc/modprobe.conf, and you are
done. ALSA went even further and introduced
the option "order", so that you write:
options snd order=snd-intel8x0,snd-hda-intel
for example. So, from some point of view, this
is actually easier than the udev solution
(eg. I always did that and never played with
udev :), but indeed, having two ways of doing
the same thing is usually confusing, so I am
not trying to talk you into applying my patch. :)
If there is an intention to deprecate the "video_nr"
thing, then it certainly doesn't apply.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-12 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 18:53 [patch] add video_nr module param to gspca Stas Sergeev
2009-01-11 19:25 ` Jean-Francois Moine
2009-01-11 20:17   ` Stas Sergeev
     [not found]     ` <20090112085103.0e84305a@free.fr>
2009-01-12 10:51       ` Stas Sergeev
2009-01-11 23:19 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox