linux/drivers/media
brandon@ifup.org 539a7555b3 V4L/DVB (8078): Introduce "index" attribute for persistent video4linux device nodes
A number of V4L drivers have a mod param to specify their preferred minors.
This is because it is often desirable for applications to have a static /dev
name for a particular device.  However, using minors has several disadvantages:

  1) the requested minor may already be taken
  2) using a mod param is driver specific
  3) it requires every driver to add a param
  4) requires configuration by hand

This patch introduces an "index" attribute that when combined with udev rules
can create static device paths like this:

/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video1
/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video2

$ ls -la /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
lrwxrwxrwx 1 root root 12 2008-04-28 00:02 /dev/v4l/by-path/pci-0000:00:1d.2-usb-0:1:1.0-video0 -> ../../video1

These paths are steady across reboots and should be resistant to rearranging
across Kernel versions.

video_register_device_index is available to drivers to request a
specific index number.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Kees Cook <kees@outflux.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:27 -03:00
..
common V4L/DVB (8060): Kconfig: MEDIA_TUNER_CUSTOMIZE should be disabled by default 2008-07-20 07:10:05 -03:00
dvb V4L/DVB (8076): budget-ci: Support the bundled remote control of the TT DVB-C 1501 2008-07-20 07:10:21 -03:00
radio V4L/DVB (7997): si470x: hardware frequency seek support 2008-07-20 07:08:43 -03:00
video V4L/DVB (8078): Introduce "index" attribute for persistent video4linux device nodes 2008-07-20 07:10:27 -03:00
Kconfig V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic 2008-05-14 02:56:47 -03:00
Makefile V4L/DVB (7908): always enter drivers/media/video/ 2008-06-05 06:35:42 -03:00