summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_rum.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_rum.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_rum.c')
-rw-r--r--sys/dev/usb/if_rum.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 16ed1ad..2af38f1 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -388,7 +388,7 @@ USB_ATTACH(rum)
if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) {
printf("%s: could not set configuration no\n",
device_get_nameunit(sc->sc_dev));
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
/* get the first interface handle */
@@ -397,7 +397,7 @@ USB_ATTACH(rum)
if (error != 0) {
printf("%s: could not get interface handle\n",
device_get_nameunit(sc->sc_dev));
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
/*
@@ -411,7 +411,7 @@ USB_ATTACH(rum)
if (ed == NULL) {
printf("%s: no endpoint descriptor for iface %d\n",
device_get_nameunit(sc->sc_dev), i);
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
@@ -424,7 +424,7 @@ USB_ATTACH(rum)
if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) {
printf("%s: missing endpoint\n",
device_get_nameunit(sc->sc_dev));
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK,
@@ -444,7 +444,7 @@ USB_ATTACH(rum)
if (ntries == 1000) {
printf("%s: timeout waiting for chip to settle\n",
device_get_nameunit(sc->sc_dev));
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
/* retrieve MAC address and various other things from EEPROM */
@@ -459,7 +459,7 @@ USB_ATTACH(rum)
if (error != 0) {
device_printf(sc->sc_dev, "could not load 8051 microcode\n");
mtx_destroy(&sc->sc_mtx);
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
ifp = sc->sc_ifp = if_alloc(IFT_ETHER);
@@ -467,7 +467,7 @@ USB_ATTACH(rum)
printf("%s: can not if_alloc()\n",
device_get_nameunit(sc->sc_dev));
mtx_destroy(&sc->sc_mtx);
- USB_ATTACH_ERROR_RETURN;
+ return ENXIO;
}
ifp->if_softc = sc;
@@ -565,7 +565,7 @@ USB_ATTACH(rum)
if (bootverbose)
ieee80211_announce(ic);
- USB_ATTACH_SUCCESS_RETURN;
+ return 0;
}
USB_DETACH(rum)
OpenPOWER on IntegriCloud