Source-Changes archive

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

Re: CVS commit: src/sys



Can you try the appended patch?

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
Index: epohci.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/ep93xx/epohci.c,v
retrieving revision 1.2
diff -u -p -r1.2 epohci.c
--- epohci.c    11 Dec 2005 12:16:45 -0000      1.2
+++ epohci.c    3 Apr 2008 14:16:52 -0000
@@ -71,7 +71,7 @@ struct epohci_softc {
        int     sc_intr;
 };
 
-CFATTACH_DECL(epohci, sizeof(struct epohci_softc),
+CFATTACH_DECL_NEW(epohci, sizeof(struct epohci_softc),
     epohci_match, epohci_attach, NULL, NULL);
 
 int
@@ -85,11 +85,14 @@ epohci_match(struct device *parent, stru
 void
 epohci_attach(struct device *parent, struct device *self, void *aux)
 {
-       struct epohci_softc *sc = (struct epohci_softc *)self;
+       struct epohci_softc *sc = device_private(self);
        struct epsoc_attach_args *sa = aux;
        u_int32_t i;
        bus_space_handle_t syscon_ioh;
 
+       sc->sc.sc_dev = self;
+       sc->sc.sc_bus.hci_private = sc;
+
        sc->sc.iot = sa->sa_iot;
        sc->sc.sc_bus.dmatag = sa->sa_dmat;
        sc->sc_intr = sa->sa_intr;
@@ -132,7 +135,7 @@ void
 epohci_callback(self)
         struct device *self;
 {
-       struct epohci_softc *sc = (struct epohci_softc *)self;
+       struct epohci_softc *sc = device_private(self);
        usbd_status r;
 
        /* Disable interrupts, so we don't get any spurious ones. */
@@ -146,14 +149,13 @@ epohci_callback(self)
        r = ohci_init(&sc->sc);
 
        if (r != USBD_NORMAL_COMPLETION) {
-               printf("%s: init failed, error=%d\n", 
sc->sc.sc_bus.bdev.dv_xname, r);
+               printf("%s: init failed, error=%d\n", device_xname(self), r);
 
                ep93xx_intr_disestablish(sc->sc_ih);
                return;
        }
 
        /* Attach usb device. */
-       sc->sc.sc_child = config_found((void *) sc, &sc->sc.sc_bus,
-           usbctlprint);
+       sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint);
 
 }


Home | Main Index | Thread Index | Old Index