summaryrefslogtreecommitdiffstats
path: root/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb.c')
-rw-r--r--usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usb.c b/usb.c
index 84b54d5..4ecf398 100644
--- a/usb.c
+++ b/usb.c
@@ -29,10 +29,10 @@ extern struct pciusb_entries usb_probe(void) {
fprintf(stderr, "%s %d: unknown ``P'' line\n", file, line);
pciusb_initialize(e);
}
- } else if (e && buf[0] == 'I' && e->class == 0) {
- int class, sub, prot = 0;
- if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class, &sub, &prot) == 3) {
- e->class = (class * 0x100 + sub) * 0x100 + prot;
+ } else if (e && buf[0] == 'I' && e->class_ == 0) {
+ int class_, sub, prot = 0;
+ if (sscanf(buf, "I: If#=%*2d Alt=%*2d #EPs=%*2d Cls=%02x(%*5c) Sub=%02x Prot=%02x", &class_, &sub, &prot) == 3) {
+ e->class_ = (class_ * 0x100 + sub) * 0x100 + prot;
} else {
fprintf(stderr, "%s %d: unknown ``I'' line\n", file, line);
}