summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_cue.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-06-12 15:37:19 +0000
committerimp <imp@FreeBSD.org>2007-06-12 15:37:19 +0000
commitd4a700c2dc6c55dae07b6ed7fe4d47508632b9f4 (patch)
tree0ae8c91399f156d2d3de7df83e1fc292de48873b /sys/dev/usb/if_cue.c
parentd6014e5948f9129258e24ea5eed97306faafe1cb (diff)
downloadFreeBSD-src-d4a700c2dc6c55dae07b6ed7fe4d47508632b9f4.zip
FreeBSD-src-d4a700c2dc6c55dae07b6ed7fe4d47508632b9f4.tar.gz
Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from
usb_port.h. They aren't needed, and are a legacy of this code's past.
Diffstat (limited to 'sys/dev/usb/if_cue.c')
-rw-r--r--sys/dev/usb/if_cue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 8e9b3a9..cefa42f 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -443,7 +443,7 @@ USB_ATTACH(cue)
if (usbd_set_config_no(sc->cue_udev, CUE_CONFIG_NO, 0)) {
device_printf(sc->cue_dev, "getting interface handle failed\n");
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
id = usbd_get_interface_descriptor(uaa->iface);
@@ -453,7 +453,7 @@ USB_ATTACH(cue)
ed = usbd_interface2endpoint_descriptor(uaa->iface, i);
if (!ed) {
device_printf(sc->cue_dev, "couldn't get ep %d\n", i);
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
@@ -485,7 +485,7 @@ USB_ATTACH(cue)
device_printf(sc->cue_dev, "can not if_alloc()\n");
CUE_UNLOCK(sc);
mtx_destroy(&sc->cue_mtx);
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
ifp->if_softc = sc;
if_initname(ifp, "cue", device_get_unit(sc->cue_dev));
@@ -511,7 +511,7 @@ USB_ATTACH(cue)
sc->cue_dying = 0;
CUE_UNLOCK(sc);
- USB_ATTACH_SUCCESS_RETURN;
+ return 0;
}
static int
OpenPOWER on IntegriCloud