nusb: put setleds in kbwork
This commit is contained in:
parent
5bf221bab7
commit
e5bab1dd9f
1 changed files with 3 additions and 4 deletions
|
@ -451,6 +451,9 @@ kbdwork(void *a)
|
|||
if(f->ep->maxpkt < 3 || f->ep->maxpkt > sizeof buf)
|
||||
kbfatal(f, "weird maxpkt");
|
||||
|
||||
if(setleds(f, f->ep->id, 0) < 0)
|
||||
kbfatal(f, "setleds failed");
|
||||
|
||||
f->repeatc = chancreate(sizeof(ulong), 0);
|
||||
if(f->repeatc == nil)
|
||||
kbfatal(f, "chancreate failed");
|
||||
|
@ -543,10 +546,6 @@ kbstart(Dev *d, Ep *ep, Kin *in, void (*f)(void*), int accel)
|
|||
kd->ep = nil;
|
||||
return;
|
||||
}
|
||||
if(f == kbdwork && setleds(kd, ep->id, 0) < 0){
|
||||
fprint(2, "kb: %s: setleds: %r\n", d->dir);
|
||||
return;
|
||||
}
|
||||
incref(d);
|
||||
proccreate(f, kd, Stack);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue