Permalink
Browse files

lsusb.c: correctly dump ccid devices

CCID has now an official class according to:
  http://www.usb.org/developers/defined_class/

This patch removes the hard-coded value and replace it by a #define,
and also call dump_ccid_device() when use in a common class interface
descriptor.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
1 parent ff889c0 commit 277327cd6a61d96f9c322289e055ec2b4a129096 @aurel32 aurel32 committed with Feb 14, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 lsusb.c
View
@@ -76,6 +76,9 @@
#define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE)
#define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT)
+#ifndef USB_CLASS_CCID
+#define USB_CLASS_CCID 0x0b
+#endif
#ifndef USB_CLASS_VIDEO
#define USB_CLASS_VIDEO 0x0e
@@ -598,6 +601,9 @@ static void dump_altsetting(struct usb_dev_handle *dev, struct usb_interface_des
case USB_CLASS_HID:
dump_hid_device(dev, interface, buf);
break;
+ case USB_CLASS_CCID:
+ dump_ccid_device(buf);
+ break;
default:
goto dump;
}
@@ -611,7 +617,7 @@ static void dump_altsetting(struct usb_dev_handle *dev, struct usb_interface_des
case USB_CLASS_HID:
dump_hid_device(dev, interface, buf);
break;
- case 0x0b: /* chip/smartcard */
+ case USB_CLASS_CCID:
dump_ccid_device(buf);
break;
case 0xe0: /* wireless */

0 comments on commit 277327c

Please sign in to comment.