Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Some more device_t, cfdata_t, CFATTACH_DECL_NEW cle...
details: https://anonhg.NetBSD.org/src/rev/0631b77d9563
branches: trunk
changeset: 765799:0631b77d9563
user: matt <matt%NetBSD.org@localhost>
date: Mon Jun 06 16:29:14 2011 +0000
description:
Some more device_t, cfdata_t, CFATTACH_DECL_NEW cleanup.
diffstat:
sys/arch/arm/at91/at91aic.c | 6 +++---
sys/arch/arm/ofw/ofwgencfg_machdep.c | 10 +++++-----
sys/arch/arm/xscale/pxa2x0_intr.c | 14 +++++++-------
sys/arch/cats/pci/pcib.c | 18 +++++++++---------
sys/arch/evbarm/adi_brh/obio.c | 24 +++++++++++-------------
sys/arch/evbarm/hdl_g/obio.c | 24 +++++++++++-------------
sys/arch/evbarm/iq80310/obio.c | 24 +++++++++++-------------
sys/arch/evbarm/iq80321/obio.c | 24 +++++++++++-------------
sys/arch/evbarm/ixm1200/nappi_nppb.c | 14 +++++++-------
sys/arch/iyonix/iyonix/obio.c | 24 +++++++++++-------------
sys/arch/netwinder/pci/pcib.c | 18 +++++++++---------
sys/arch/shark/ofw/ofisapc.c | 14 +++++++-------
sys/arch/shark/ofw/ofisascr.c | 14 +++++++-------
sys/arch/shark/shark/shark_machdep.c | 18 +++++++++---------
14 files changed, 118 insertions(+), 128 deletions(-)
diffs (truncated from 783 to 300 lines):
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/arm/at91/at91aic.c
--- a/sys/arch/arm/at91/at91aic.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/arm/at91/at91aic.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,5 +1,5 @@
-/* $Id: at91aic.c,v 1.5 2010/12/20 00:25:27 matt Exp $ */
-/* $NetBSD: at91aic.c,v 1.5 2010/12/20 00:25:27 matt Exp $ */
+/* $Id: at91aic.c,v 1.6 2011/06/06 16:29:14 matt Exp $ */
+/* $NetBSD: at91aic.c,v 1.6 2011/06/06 16:29:14 matt Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy.
@@ -75,7 +75,7 @@
static int at91aic_match(device_t, cfdata_t, void *);
static void at91aic_attach(device_t, device_t, void *);
-CFATTACH_DECL(at91aic, sizeof(struct device),
+CFATTACH_DECL_NEW(at91aic, 0,
at91aic_match, at91aic_attach, NULL, NULL);
static int
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/arm/ofw/ofwgencfg_machdep.c
--- a/sys/arch/arm/ofw/ofwgencfg_machdep.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/arm/ofw/ofwgencfg_machdep.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwgencfg_machdep.c,v 1.17 2009/03/14 15:36:02 dsl Exp $ */
+/* $NetBSD: ofwgencfg_machdep.c,v 1.18 2011/06/06 16:29:14 matt Exp $ */
/*
* Copyright 1997
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.17 2009/03/14 15:36:02 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.18 2011/06/06 16:29:14 matt Exp $");
#include "opt_ddb.h"
@@ -88,8 +88,8 @@
extern void data_abort_handler(trapframe_t *frame);
extern void prefetch_abort_handler(trapframe_t *frame);
extern void undefinedinstruction_bounce(trapframe_t *frame);
-int ofbus_match(struct device *, struct cfdata *, void *);
-void ofbus_attach(struct device *, struct device *, void *);
+int ofbus_match(device_t, cfdata_t, void *);
+void ofbus_attach(device_t, device_t, void *);
/* Local routines */
static void process_kernel_args(void);
@@ -106,7 +106,7 @@
int ofw_handleticks = 0; /* set to TRUE by cpu_initclocks */
-CFATTACH_DECL(ofbus_root, sizeof(struct device),
+CFATTACH_DECL_NEW(ofbus_root, 0,
ofbus_match, ofbus_attach, NULL, NULL);
/**************************************************************/
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/arm/xscale/pxa2x0_intr.c
--- a/sys/arch/arm/xscale/pxa2x0_intr.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_intr.c,v 1.17 2010/06/13 02:11:23 tsutsui Exp $ */
+/* $NetBSD: pxa2x0_intr.c,v 1.18 2011/06/06 16:29:15 matt Exp $ */
/*
* Copyright (c) 2002 Genetec Corporation. All rights reserved.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.17 2010/06/13 02:11:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.18 2011/06/06 16:29:15 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,10 +58,10 @@
/*
* INTC autoconf glue
*/
-static int pxaintc_match(struct device *, struct cfdata *, void *);
-static void pxaintc_attach(struct device *, struct device *, void *);
+static int pxaintc_match(device_t, cfdata_t, void *);
+static void pxaintc_attach(device_t, device_t, void *);
-CFATTACH_DECL(pxaintc, sizeof(struct device),
+CFATTACH_DECL_NEW(pxaintc, 0,
pxaintc_match, pxaintc_attach, NULL, NULL);
static int pxaintc_attached;
@@ -98,7 +98,7 @@
static int
-pxaintc_match(struct device *parent, struct cfdata *cf, void *aux)
+pxaintc_match(device_t parent, cfdata_t cf, void *aux)
{
struct pxaip_attach_args *pxa = aux;
@@ -109,7 +109,7 @@
}
void
-pxaintc_attach(struct device *parent, struct device *self, void *args)
+pxaintc_attach(device_t parent, device_t self, void *args)
{
int i;
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/cats/pci/pcib.c
--- a/sys/arch/cats/pci/pcib.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/cats/pci/pcib.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcib.c,v 1.13 2010/01/14 10:32:49 skrll Exp $ */
+/* $NetBSD: pcib.c,v 1.14 2011/06/06 16:29:15 matt Exp $ */
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.13 2010/01/14 10:32:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.14 2011/06/06 16:29:15 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,16 +49,16 @@
#include "isadma.h"
-int pcibmatch(struct device *, struct cfdata *, void *);
-void pcibattach(struct device *, struct device *, void *);
+int pcibmatch(device_t, cfdata_t, void *);
+void pcibattach(device_t, device_t, void *);
-CFATTACH_DECL(pcib, sizeof(struct device),
+CFATTACH_DECL_NEW(pcib, 0,
pcibmatch, pcibattach, NULL, NULL);
-void pcib_callback(struct device *);
+void pcib_callback(device_t);
int
-pcibmatch(struct device *parent, struct cfdata *match, void *aux)
+pcibmatch(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa = aux;
@@ -78,7 +78,7 @@
}
void
-pcibattach(struct device *parent, struct device *self, void *aux)
+pcibattach(device_t parent, device_t self, void *aux)
{
struct pci_attach_args *pa = aux;
char devinfo[256];
@@ -98,7 +98,7 @@
}
void
-pcib_callback(struct device *self)
+pcib_callback(device_t self)
{
struct isabus_attach_args iba;
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/evbarm/adi_brh/obio.c
--- a/sys/arch/evbarm/adi_brh/obio.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/evbarm/adi_brh/obio.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.9 2005/12/11 12:17:06 christos Exp $ */
+/* $NetBSD: obio.c,v 1.10 2011/06/06 16:29:15 matt Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.9 2005/12/11 12:17:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.10 2011/06/06 16:29:15 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,21 +58,20 @@
#include "locators.h"
-int obio_match(struct device *, struct cfdata *, void *);
-void obio_attach(struct device *, struct device *, void *);
+int obio_match(device_t, cfdata_t, void *);
+void obio_attach(device_t, device_t, void *);
-CFATTACH_DECL(obio, sizeof(struct device),
+CFATTACH_DECL_NEW(obio, 0,
obio_match, obio_attach, NULL, NULL);
int obio_print(void *, const char *);
-int obio_search(struct device *, struct cfdata *,
- const int *, void *);
+int obio_search(device_t, cfdata_t, const int *, void *);
/* there can be only one */
-int obio_found;
+bool obio_found;
int
-obio_match(struct device *parent, struct cfdata *cf, void *aux)
+obio_match(device_t parent, cfdata_t cf, void *aux)
{
#if 0
struct mainbus_attach_args *ma = aux;
@@ -93,10 +92,10 @@
}
void
-obio_attach(struct device *parent, struct device *self, void *aux)
+obio_attach(device_t parent, device_t self, void *aux)
{
- obio_found = 1;
+ obio_found = true;
aprint_naive("\n");
aprint_normal("\n");
@@ -125,8 +124,7 @@
}
int
-obio_search(struct device *parent, struct cfdata *cf,
- const int *ldesc, void *aux)
+obio_search(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
{
struct obio_attach_args oba;
diff -r d386415f5a69 -r 0631b77d9563 sys/arch/evbarm/hdl_g/obio.c
--- a/sys/arch/evbarm/hdl_g/obio.c Mon Jun 06 16:16:00 2011 +0000
+++ b/sys/arch/evbarm/hdl_g/obio.c Mon Jun 06 16:29:14 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.1 2006/04/16 02:22:33 nonaka Exp $ */
+/* $NetBSD: obio.c,v 1.2 2011/06/06 16:29:15 matt Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.1 2006/04/16 02:22:33 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.2 2011/06/06 16:29:15 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,21 +52,20 @@
#include "locators.h"
-int obio_match(struct device *, struct cfdata *, void *);
-void obio_attach(struct device *, struct device *, void *);
+int obio_match(device_t, cfdata_t, void *);
+void obio_attach(device_t, device_t, void *);
-CFATTACH_DECL(obio, sizeof(struct device),
+CFATTACH_DECL_NEW(obio, 0,
obio_match, obio_attach, NULL, NULL);
int obio_print(void *, const char *);
-int obio_search(struct device *, struct cfdata *,
- const int *, void *);
+int obio_search(device_t, cfdata_t, const int *, void *);
/* there can be only one */
-int obio_found;
+bool obio_found;
int
-obio_match(struct device *parent, struct cfdata *cf, void *aux)
+obio_match(device_t parent, cfdata_t cf, void *aux)
{
if (obio_found)
@@ -75,10 +74,10 @@
}
void
-obio_attach(struct device *parent, struct device *self, void *aux)
+obio_attach(device_t parent, device_t self, void *aux)
{
- obio_found = 1;
+ obio_found = true;
aprint_naive("\n");
aprint_normal("\n");
@@ -107,8 +106,7 @@
}
int
-obio_search(struct device *parent, struct cfdata *cf,
- const int *ldesc, void *aux)
Home |
Main Index |
Thread Index |
Old Index