Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Minor code re-org. No functional change in...
details: https://anonhg.NetBSD.org/src/rev/98f291331ad9
branches: nick-nhusb
changeset: 334627:98f291331ad9
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jan 31 17:09:08 2017 +0000
description:
Minor code re-org. No functional change intended.
diffstat:
sys/dev/usb/if_smsc.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (39 lines):
diff -r 953188b0a486 -r 98f291331ad9 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Tue Jan 31 16:52:39 2017 +0000
+++ b/sys/dev/usb/if_smsc.c Tue Jan 31 17:09:08 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.22.2.22 2017/01/31 16:52:39 skrll Exp $ */
+/* $NetBSD: if_smsc.c,v 1.22.2.23 2017/01/31 17:09:08 skrll Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -1032,14 +1032,8 @@
", err=%s\n", usbd_errstr(err));
return;
}
+
/* Setup the endpoints for the SMSC LAN95xx device(s) */
- usb_init_task(&sc->sc_tick_task, smsc_tick_task, sc, 0);
-
- mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
- mutex_init(&sc->sc_txlock, MUTEX_DEFAULT, IPL_SOFTUSB);
- mutex_init(&sc->sc_rxlock, MUTEX_DEFAULT, IPL_SOFTUSB);
- mutex_init(&sc->sc_mii_lock, MUTEX_DEFAULT, IPL_NONE);
-
err = usbd_device2interface_handle(dev, SMSC_IFACE_IDX, &sc->sc_iface);
if (err) {
aprint_error_dev(self, "getting interface handle failed\n");
@@ -1072,6 +1066,13 @@
}
}
+ usb_init_task(&sc->sc_tick_task, smsc_tick_task, sc, 0);
+
+ mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_NONE);
+ mutex_init(&sc->sc_txlock, MUTEX_DEFAULT, IPL_SOFTUSB);
+ mutex_init(&sc->sc_rxlock, MUTEX_DEFAULT, IPL_SOFTUSB);
+ mutex_init(&sc->sc_mii_lock, MUTEX_DEFAULT, IPL_NONE);
+
ifp = &sc->sc_ec.ec_if;
ifp->if_softc = sc;
strlcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
Home |
Main Index |
Thread Index |
Old Index