summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-06-12 16:41:29 +0000
committerimp <imp@FreeBSD.org>2007-06-12 16:41:29 +0000
commitfc9cb03e61e12e2da0f587a3fdccfdd9367dda86 (patch)
tree2644e6df20222f3bdb873fc3643639b51f0cbb10 /sys/dev
parent884f4a3485e415e710d4afe9940cf1a27a5c978d (diff)
downloadFreeBSD-src-fc9cb03e61e12e2da0f587a3fdccfdd9367dda86.zip
FreeBSD-src-fc9cb03e61e12e2da0f587a3fdccfdd9367dda86.tar.gz
clalloc and clfree are useles. Remove them. Remove dead code that's
always been dead for years, but has been obfuscated by these macros.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhid.c8
-rw-r--r--sys/dev/usb/usb_port.h3
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
OpenPOWER on IntegriCloud