diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-04 13:36:54 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-10-04 13:36:54 +0200 |
commit | 4b02add35284f34c7904c54a9e57630c0c8cbef2 (patch) | |
tree | dcfe55fb58f0f3c46b47ffe30d56079667e0812d /linux/drivers/media/video/ivtv/ivtv-driver.c | |
parent | b7d150678426686774ff4ee8365061eeefe7f021 (diff) | |
download | mediapointer-dvb-s2-4b02add35284f34c7904c54a9e57630c0c8cbef2.tar.gz mediapointer-dvb-s2-4b02add35284f34c7904c54a9e57630c0c8cbef2.tar.bz2 |
v4l: disconnect kernel number from minor
From: Hans Verkuil <hverkuil@xs4all.nl>
The v4l core creates four different video devices (video, vbi, radio, vtx)
and each has its own range of minor numbers. However, modern devices keep
increasing the number of devices that they need so a maximum of 64 video
devices will not be enough in the future. In addition this scheme makes
it very hard to add new device types.
This patch disconnects the kernel number allocation (e.g. video0, video1,
etc.) from the actual minor number (just pick the first free minor).
This allows for much more flexibility in the future. However, it does
require the use of udev. For those who cannot use udev a new CONFIG option
was created that changes the allocation scheme back to the old behavior.
Thanks to Greg KH for suggesting this approach during the 2008 LPC.
In addition, several bugs were fixed in the ivtv and cx18 drivers: these
drivers try to allocate specific kernel numbers but that scheme contained
a bug which caused what should have been e.g. video17 to appear as e.g.
video2.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-driver.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c index def2c5502..8c07b9bc8 100644 --- a/linux/drivers/media/video/ivtv/ivtv-driver.c +++ b/linux/drivers/media/video/ivtv/ivtv-driver.c @@ -61,14 +61,14 @@ #include "tuner-xc2028.h" /* var to keep track of the number of array elements in use */ -int ivtv_cards_active = 0; +int ivtv_cards_active; /* If you have already X v4l cards, then set this to X. This way the device numbers stay matched. Example: you have a WinTV card without radio and a PVR-350 with. Normally this would give a video1 device together with a radio0 device for the PVR. By setting this to 1 you ensure that radio0 is now also radio1. */ -int ivtv_first_minor = 0; +int ivtv_first_minor; /* Master variable for all ivtv info */ struct ivtv *ivtv_cards[IVTV_MAX_CARDS]; @@ -251,7 +251,7 @@ MODULE_PARM_DESC(newi2c, "\t\t\t-1 is autodetect, 0 is off, 1 is on\n" "\t\t\tDefault is autodetect"); -MODULE_PARM_DESC(ivtv_first_minor, "Set minor assigned to first card"); +MODULE_PARM_DESC(ivtv_first_minor, "Set kernel number assigned to first card"); MODULE_AUTHOR("Kevin Thayer, Chris Kennedy, Hans Verkuil"); MODULE_DESCRIPTION("CX23415/CX23416 driver"); |