mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-20 18:15:29 +00:00
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> |
History
|
|
|---|---|---|
| .. | ||
| audiochip.h | ||
| cs53l32a.h | ||
| cs5345.h | ||
| cx2341x.h | ||
| cx25840.h | ||
| i2c-addr.h | ||
| ir-common.h | ||
| ir-kbd-i2c.h | ||
| m52790.h | ||
| msp3400.h | ||
| ovcamchip.h | ||
| pwc-ioctl.h | ||
| rds.h | ||
| saa6752hs.h | ||
| saa7115.h | ||
| saa7127.h | ||
| saa7146.h | ||
| saa7146_vv.h | ||
| soc_camera.h | ||
| tuner-types.h | ||
| tuner.h | ||
| tvaudio.h | ||
| tveeprom.h | ||
| tvp5150.h | ||
| upd64031a.h | ||
| upd64083.h | ||
| v4l2-chip-ident.h | ||
| v4l2-common.h | ||
| v4l2-dev.h | ||
| v4l2-i2c-drv-legacy.h | ||
| v4l2-i2c-drv.h | ||
| v4l2-int-device.h | ||
| videobuf-core.h | ||
| videobuf-dma-sg.h | ||
| videobuf-dvb.h | ||
| videobuf-vmalloc.h | ||
| wm8775.h | ||