Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb remove USB_ macros per dyoung.



details:   https://anonhg.NetBSD.org/src/rev/59be48d630ed
branches:  trunk
changeset: 758384:59be48d630ed
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 03 21:07:24 2010 +0000

description:
remove USB_ macros per dyoung.

diffstat:

 sys/dev/usb/if_otus.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r a6305f62d37e -r 59be48d630ed sys/dev/usb/if_otus.c
--- a/sys/dev/usb/if_otus.c     Wed Nov 03 20:46:58 2010 +0000
+++ b/sys/dev/usb/if_otus.c     Wed Nov 03 21:07:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_otus.c,v 1.3 2010/11/03 20:46:33 christos Exp $     */
+/*     $NetBSD: if_otus.c,v 1.4 2010/11/03 21:07:24 christos Exp $     */
 /*     $OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $        */
 
 /*-
@@ -78,6 +78,8 @@
 #define DPRINTF(...) \
        DPRINTFN(1, __VA_ARGS__)
 
+Static int     otus_match(device_t, cfdata_t, void *);
+Static void    otus_attach(device_t, device_t, void *);
 Static int     otus_detach(struct device *, int);
 Static int     otus_activate(device_t, devact_t);
 Static void    otus_attachhook(device_t);
@@ -561,9 +563,11 @@
        { USB_VENDOR_ZYXEL,             USB_PRODUCT_ZYXEL_NWD271N }
 };
 
-USB_DECLARE_DRIVER(otus);
-
-USB_MATCH(otus)
+CFATTACH_DECL_NEW(otus, sizeof(struct otus_softc), otus_match, otus_attach,
+    otus_detach, otus_activate);
+
+int
+otus_match(device_t parent, cfdata_t match, void *aux)
 {
        struct usb_attach_arg *uaa = aux;
 
@@ -574,7 +578,8 @@
            UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
 }
 
-USB_ATTACH(otus)
+void
+otus_attach(device_t parent, device_t self, void *aux)
 {
        struct otus_softc *sc = device_private(self);
        struct usb_attach_arg *uaa = aux;



Home | Main Index | Thread Index | Old Index