udev: fix SUBSYSTEMS and ATTRS{idVendor} checks
Rules with a single condition where a parent property is checked with != don't work properly. E.g.: SUBSYSTEMS!="usb", GOTO="end" or: ATTRS{idVendor}!="abcd", GOTO="end" Instead, we can mix both those previous parent rules and match them: SUBSYSTEMS=="usb",ATTRS{idVendor}=="abcd", GOTO="next" GOTO="end" LABEL="next" # Apply rules here LABEL="end" In this case both SUBSYSTEMS and ATTRS conditions apply to the parent usb_device (idVendor attribute is only available in the usb_device), so they apply to all ports of the same device.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
ACTION!="add|change|move", GOTO="mm_cinterion_port_types_end"
|
||||
SUBSYSTEMS!="usb", GOTO="mm_cinterion_port_types_end"
|
||||
SUBSYSTEM!="tty", GOTO="mm_cinterion_port_types_end"
|
||||
ATTRS{idVendor}!="1e2d", GOTO="mm_cinterion_port_types_end"
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1e2d", GOTO="mm_cinterion_port_types"
|
||||
GOTO="mm_cinterion_port_types_end"
|
||||
|
||||
LABEL="mm_cinterion_port_types"
|
||||
|
||||
ATTRS{idVendor}=="1e2d", ATTRS{idProduct}=="0053", ATTRS{bInterfaceNumber}=="01", ENV{ID_MM_CINTERION_PORT_TYPE_GPS}="1"
|
||||
|
||||
|
Reference in New Issue
Block a user