summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extras/usb_id/usb_id.c4
-rw-r--r--rules/rules.d/60-persistent-v4l.rules3
2 files changed, 6 insertions, 1 deletions
diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c
index 6dd1d450fb..00d8a4c139 100644
--- a/extras/usb_id/usb_id.c
+++ b/extras/usb_id/usb_id.c
@@ -70,7 +70,9 @@ static void set_usb_iftype(char *to, int if_class_num, size_t len)
case 0x0a: /* CDC-Data */
case 0x0b: /* Chip/Smart Card */
case 0x0d: /* Content Security */
- case 0x0e: /* Video */
+ case 0x0e:
+ type = "video";
+ break;
case 0xdc: /* Diagnostic Device */
case 0xe0: /* Wireless Controller */
case 0xf2: /* Application-specific */
diff --git a/rules/rules.d/60-persistent-v4l.rules b/rules/rules.d/60-persistent-v4l.rules
index 0d673ab396..fb961b79e0 100644
--- a/rules/rules.d/60-persistent-v4l.rules
+++ b/rules/rules.d/60-persistent-v4l.rules
@@ -3,6 +3,9 @@
ACTION!="add|change", GOTO="persistent_v4l_end"
SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end"
+SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export"
+KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}"
+
# check for valid "index" number
TEST!="index", GOTO="persistent_v4l_end"
ATTR{index}!="?*", GOTO="persistent_v4l_end"