Module Name:    src
Committed By:   msaitoh
Date:           Sun Oct 14 18:37:55 UTC 2012

Modified Files:
        src/sys/arch/evbarm/iq80310: i80312_mainbus.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/iq80310/i80312_mainbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/iq80310/i80312_mainbus.c
diff -u src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15 src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.16
--- src/sys/arch/evbarm/iq80310/i80312_mainbus.c:1.15	Wed Oct  3 16:51:44 2012
+++ src/sys/arch/evbarm/iq80310/i80312_mainbus.c	Sun Oct 14 18:37:55 2012
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: i80312_mainb
 #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 @@ i80312_mainbus_match(struct device *pare
 }
 
 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 @@ i80312_mainbus_attach(struct device *par
 	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.

Reply via email to