summaryrefslogtreecommitdiff
path: root/sys/src/cmd/nusb/lib
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-09-06 05:25:23 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-09-06 05:25:23 +0200
commita064a48e6d213acc97c86cd24160847fecc68f6b (patch)
tree664aa4de66f26b84a94e096a16f8de42cd3aef26 /sys/src/cmd/nusb/lib
parent3cdaf6ea5f649e9b89608d7fbd2ddb0e5cb52af4 (diff)
nusb: handle 0 csp value on iface, remove unneeded configdev() calls after getdev()
Diffstat (limited to 'sys/src/cmd/nusb/lib')
-rw-r--r--sys/src/cmd/nusb/lib/parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/nusb/lib/parse.c b/sys/src/cmd/nusb/lib/parse.c
index 642c427a2..75904622a 100644
--- a/sys/src/cmd/nusb/lib/parse.c
+++ b/sys/src/cmd/nusb/lib/parse.c
@@ -71,6 +71,8 @@ parseiface(Usbdev *d, Conf *c, uchar *b, int n, Iface **ipp, Altc **app)
subclass = dip->bInterfaceSubClass;
proto = dip->bInterfaceProtocol;
ip->csp = CSP(class, subclass, proto);
+ if(ip->csp == 0)
+ ip->csp = d->csp;
if(d->csp == 0) /* use csp from 1st iface */
d->csp = ip->csp; /* if device has none */
if(d->class == 0)