From d4a700c2dc6c55dae07b6ed7fe4d47508632b9f4 Mon Sep 17 00:00:00 2001 From: imp Date: Tue, 12 Jun 2007 15:37:19 +0000 Subject: 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. --- sys/dev/usb/if_cue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/usb/if_cue.c') 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 -- cgit v1.1