Module Name: src Committed By: macallan Date: Thu Aug 18 02:56:21 UTC 2011
Modified Files: src/sys/arch/sgimips/dev: crime.c crimevar.h Log Message: device_t-ify To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sgimips/dev/crime.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sgimips/dev/crimevar.h 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/sgimips/dev/crime.c diff -u src/sys/arch/sgimips/dev/crime.c:1.35 src/sys/arch/sgimips/dev/crime.c:1.36 --- src/sys/arch/sgimips/dev/crime.c:1.35 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crime.c Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2004 Christopher SEKIYA @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.35 2011/07/01 18:53:45 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.36 2011/08/18 02:56:21 macallan Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -61,8 +61,8 @@ #define DISABLE_CRIME_WATCHDOG -static int crime_match(struct device *, struct cfdata *, void *); -static void crime_attach(struct device *, struct device *, void *); +static int crime_match(device_t, struct cfdata *, void *); +static void crime_attach(device_t, device_t, void *); void crime_bus_reset(void); void crime_watchdog_reset(void); void crime_watchdog_disable(void); @@ -72,7 +72,7 @@ static bus_space_tag_t crm_iot; static bus_space_handle_t crm_ioh; -CFATTACH_DECL(crime, sizeof(struct crime_softc), +CFATTACH_DECL_NEW(crime, sizeof(struct crime_softc), crime_match, crime_attach, NULL, NULL); #define CRIME_NINTR 32 /* XXX */ @@ -83,7 +83,7 @@ } crime[CRIME_NINTR]; static int -crime_match(struct device *parent, struct cfdata *match, void *aux) +crime_match(device_t parent, struct cfdata *match, void *aux) { /* @@ -96,14 +96,16 @@ } static void -crime_attach(struct device *parent, struct device *self, void *aux) +crime_attach(device_t parent, device_t self, void *aux) { struct mainbus_attach_args *ma = aux; struct cpu_info * const ci = curcpu(); + struct crime_softc *sc = device_private(self); uint64_t crm_id; uint64_t baseline, endline; uint32_t startctr, endctr, cps; + sc->sc_dev = self; crm_iot = SGIMIPS_BUS_SPACE_CRIME; if (bus_space_map(crm_iot, ma->ma_addr, 0 /* XXX */, Index: src/sys/arch/sgimips/dev/crimevar.h diff -u src/sys/arch/sgimips/dev/crimevar.h:1.8 src/sys/arch/sgimips/dev/crimevar.h:1.9 --- src/sys/arch/sgimips/dev/crimevar.h:1.8 Fri Jul 1 18:53:45 2011 +++ src/sys/arch/sgimips/dev/crimevar.h Thu Aug 18 02:56:21 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crimevar.h,v 1.8 2011/07/01 18:53:45 dyoung Exp $ */ +/* $NetBSD: crimevar.h,v 1.9 2011/08/18 02:56:21 macallan Exp $ */ /* * Copyright (c) 2003 Christopher SEKIYA @@ -35,7 +35,7 @@ #include <sys/bus.h> struct crime_softc { - struct device sc_dev; + device_t sc_dev; }; void crime_intr_mask(unsigned int);