[PATCH 15/34] lsusb.py: insert class FF:FF:FF into usbclasses to avoid special casing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Mantas Mikulėnas <grawity@xxxxxxxxx>
---
 lsusb.py.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lsusb.py.in b/lsusb.py.in
index 83f9143..e1a30d7 100644
--- a/lsusb.py.in
+++ b/lsusb.py.in
@@ -156,6 +156,7 @@ def parse_usb_ids():
 			usbclasses[cid, did, prid] = UsbClass(cid, did, prid, strg + ":" + ln[6:])
 			continue
 		mode = modes.Misc
+	usbclasses[0xFF, 0xFF, 0xFF] = UsbClass(0xFF, 0xFF, 0xFF, "Vendor Specific")
 
 def find_usb_prod(vid, pid):
 	"Return device name from USB Vendor:Product list"
@@ -172,8 +173,6 @@ def find_usb_prod(vid, pid):
 
 def find_usb_class(cid, sid, pid):
 	"Return USB protocol from usbclasses list"
-	if cid == 0xff and sid == 0xff and pid == 0xff:
-		return "Vendor Specific"
 	lnlst = len(usbclasses)
 	cls = usbclasses.get((cid, sid, pid))
 	if cls:
-- 
2.21.0




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux