Skip to content

Commit

Permalink
udev: Only scan the requested USB device
Browse files Browse the repository at this point in the history
Instead of scanning all USB devices everytime a new device is plugged,
which might disrupt the functionality of the unrelated devices being
scanned, only scan for the USB device we are interested in, since we
know its VID/PID.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Feb 17, 2022
1 parent ac180d1 commit d397c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libiio.rules.cmakein
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUBSYSTEM=="usb", PROGRAM=="/bin/sh -c '@CMAKE_INSTALL_FULL_BINDIR@/iio_info -S usb | grep %s{idVendor}:%s{idProduct}'", RESULT!="", MODE="666"
SUBSYSTEM=="usb", PROGRAM=="/bin/sh -c '@CMAKE_INSTALL_FULL_BINDIR@/iio_info -S usb=%s{idVendor}:%s{idProduct} | grep %s{idVendor}:%s{idProduct}'", RESULT!="", MODE="666"

0 comments on commit d397c40

Please sign in to comment.