Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/iq80310 struct device * -> device_t change.



details:   https://anonhg.NetBSD.org/src/rev/43330750df32
branches:  trunk
changeset: 782079:43330750df32
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Oct 14 18:37:55 2012 +0000

description:
struct device * -> device_t change.
Not tested though.

diffstat:

 sys/arch/evbarm/iq80310/i80312_mainbus.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (66 lines):

diff -r d6d52aac4cee -r 43330750df32 sys/arch/evbarm/iq80310/i80312_mainbus.c
--- a/sys/arch/evbarm/iq80310/i80312_mainbus.c  Sun Oct 14 17:52:55 2012 +0000
+++ b/sys/arch/evbarm/iq80310/i80312_mainbus.c  Sun Oct 14 18:37:55 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $  */
+/*     $NetBSD: i80312_mainbus.c,v 1.16 2012/10/14 18:37:55 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.15 2012/10/03 16:51:44 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i80312_mainbus.c,v 1.16 2012/10/14 18:37:55 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,17 +60,17 @@
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcidevs.h>
 
-int    i80312_mainbus_match(struct device *, struct cfdata *, void *);
-void   i80312_mainbus_attach(struct device *, struct device *, void *);
+int    i80312_mainbus_match(device_t, cfdata_t, void *);
+void   i80312_mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(iopxs_mainbus, sizeof(struct i80312_softc),
+CFATTACH_DECL_NEW(iopxs_mainbus, sizeof(struct i80312_softc),
     i80312_mainbus_match, i80312_mainbus_attach, NULL, NULL);
 
 /* There can be only one. */
 int    i80312_mainbus_found;
 
 int
-i80312_mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+i80312_mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 #if 0
        struct mainbus_attach_args *ma = aux;
@@ -91,13 +91,14 @@
 }
 
 void
-i80312_mainbus_attach(struct device *parent, struct device *self, void *aux)
+i80312_mainbus_attach(device_t parent, device_t self, void *aux)
 {
-       struct i80312_softc *sc = (void *) self;
+       struct i80312_softc *sc = device_private(self);
        paddr_t memstart;
        psize_t memsize;
 
        i80312_mainbus_found = 1;
+       sc->sc_dev = self;
        iq80310_intr_evcnt_attach();
 
        /*
@@ -116,7 +117,7 @@
        if (bus_space_subregion(sc->sc_st, sc->sc_sh, I80312_MEM_BASE,
            I80312_MEM_SIZE, &sc->sc_mem_sh))
                panic("%s: unable to subregion MEM registers",
-                   sc->sc_dev.dv_xname);
+                   device_xname(self));
 
        /*
         * We have mapped the PCI I/O windows in the early bootstrap phase.



Home | Main Index | Thread Index | Old Index