Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips/sgimips Use CFATTACH_DECL_NEW() (no softc).



details:   https://anonhg.NetBSD.org/src/rev/ffb915eb702d
branches:  trunk
changeset: 761453:ffb915eb702d
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Jan 28 10:20:28 2011 +0000

description:
Use CFATTACH_DECL_NEW() (no softc).

diffstat:

 sys/arch/sgimips/sgimips/cpu.c     |  14 +++++++-------
 sys/arch/sgimips/sgimips/mainbus.c |  20 +++++++++-----------
 2 files changed, 16 insertions(+), 18 deletions(-)

diffs (108 lines):

diff -r 1184bbdf8901 -r ffb915eb702d sys/arch/sgimips/sgimips/cpu.c
--- a/sys/arch/sgimips/sgimips/cpu.c    Fri Jan 28 09:24:46 2011 +0000
+++ b/sys/arch/sgimips/sgimips/cpu.c    Fri Jan 28 10:20:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.24 2010/12/20 00:25:42 matt Exp $    */
+/*     $NetBSD: cpu.c,v 1.25 2011/01/28 10:20:28 tsutsui Exp $ */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.24 2010/12/20 00:25:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.25 2011/01/28 10:20:28 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -53,8 +53,8 @@
 #include <dev/arcbios/arcbios.h>
 #include <dev/arcbios/arcbiosvar.h>
 
-static int     cpu_match(struct device *, struct cfdata *, void *);
-static void    cpu_attach(struct device *, struct device *, void *);
+static int     cpu_match(device_t, cfdata_t, void *);
+static void    cpu_attach(device_t, device_t, void *);
 void           cpu_intr(uint32_t, uint32_t, vaddr_t, uint32_t);
 void *cpu_intr_establish(int, int, int (*func)(void *), void *);
 void           mips1_fpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t);
@@ -82,17 +82,17 @@
 static struct evcnt mips_spurint_evcnt =
        EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "spurious interrupts");
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpu_match, cpu_attach, NULL, NULL);
 
 static int
-cpu_match(struct device *parent, struct cfdata *match, void *aux)
+cpu_match(device_t parent, cfdata_t cf, void *aux)
 {
        return 1;
 }
 
 static void
-cpu_attach(struct device *parent, struct device *self, void *aux)
+cpu_attach(device_t parent, device_t self, void *aux)
 {
        printf(": ");
        cpu_identify();
diff -r 1184bbdf8901 -r ffb915eb702d sys/arch/sgimips/sgimips/mainbus.c
--- a/sys/arch/sgimips/sgimips/mainbus.c        Fri Jan 28 09:24:46 2011 +0000
+++ b/sys/arch/sgimips/sgimips/mainbus.c        Fri Jan 28 10:20:28 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.18 2005/12/11 12:18:58 christos Exp $    */
+/*     $NetBSD: mainbus.c,v 1.19 2011/01/28 10:20:28 tsutsui Exp $     */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.18 2005/12/11 12:18:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.19 2011/01/28 10:20:28 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -49,23 +49,22 @@
 
 #include "locators.h"
 
-static int     mainbus_match(struct device *, struct cfdata *, void *);
-static void    mainbus_attach(struct device *, struct device *, void *);
-static int     mainbus_search(struct device *, struct cfdata *,
-                              const int *, void *);
+static int     mainbus_match(device_t, cfdata_t, void *);
+static void    mainbus_attach(device_t, device_t, void *);
+static int     mainbus_search(device_t, cfdata_t, const int *, void *);
 int            mainbus_print(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 static int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
        return 1;
 }
 
 static void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
        struct mainbus_attach_args ma;
 
@@ -79,8 +78,7 @@
 }
 
 static int
-mainbus_search(struct device *parent, struct cfdata *cf,
-              const int *ldesc, void *aux)
+mainbus_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
        struct mainbus_attach_args *ma = aux;
 



Home | Main Index | Thread Index | Old Index