diff options
-rw-r--r-- | sys/dev/usb/uhid.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 3 |
2 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index ae20401..4d0a9b1 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -444,11 +444,7 @@ uhidopen(struct cdev *dev, int flag, int mode, usb_proc_ptr p) return (EBUSY); sc->sc_state |= UHID_OPEN; - if (clalloc(&sc->sc_q, UHID_BSIZE, 0) == -1) { - sc->sc_state &= ~UHID_OPEN; - return (ENOMEM); - } - + clist_alloc_cblocks(&sc->sc_q, UHID_BSIZE, UHID_BSIZE); sc->sc_ibuf = malloc(sc->sc_isize, M_USBDEV, M_WAITOK); sc->sc_obuf = malloc(sc->sc_osize, M_USBDEV, M_WAITOK); @@ -489,7 +485,7 @@ uhidclose(struct cdev *dev, int flag, int mode, usb_proc_ptr p) sc->sc_intrpipe = 0; ndflush(&sc->sc_q, sc->sc_q.c_cc); - clfree(&sc->sc_q); + clist_free_cblocks(&sc->sc_q); free(sc->sc_ibuf, M_USBDEV); free(sc->sc_obuf, M_USBDEV); diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index a221450..e46e29a 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -91,9 +91,6 @@ typedef struct callout usb_callout_t; #define usb_uncallout(h, f, d) callout_stop(&(h)) #define usb_uncallout_drain(h, f, d) callout_drain(&(h)) -#define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0) -#define clfree(p) clist_free_cblocks((p)) - #define PWR_RESUME 0 #define PWR_SUSPEND 1 |