Module Name: src
Committed By: matt
Date: Fri Jun 3 00:52:23 UTC 2011
Modified Files:
src/sys/arch/amiga/amiga: autoconf.c
src/sys/arch/amiga/dev: a2kbbc.c a34kbbc.c clock.c fd.c grf.c gvpbus.c
kbd.c msc.c zbus.c
Log Message:
CFATTACH_DECL_NEW, device_t, cfdata_t
To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amiga/amiga/autoconf.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amiga/dev/a2kbbc.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amiga/dev/a34kbbc.c
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amiga/dev/clock.c
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/amiga/dev/fd.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/amiga/dev/grf.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/gvpbus.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/amiga/dev/kbd.c
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amiga/dev/msc.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/amiga/dev/zbus.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/amiga/amiga/autoconf.c
diff -u src/sys/arch/amiga/amiga/autoconf.c:1.106 src/sys/arch/amiga/amiga/autoconf.c:1.107
--- src/sys/arch/amiga/amiga/autoconf.c:1.106 Thu Jan 13 22:02:05 2011
+++ src/sys/arch/amiga/amiga/autoconf.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $ */
+/* $NetBSD: autoconf.c,v 1.107 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.106 2011/01/13 22:02:05 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.107 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,9 +51,9 @@
#endif
static void findroot(void);
-void mbattach(struct device *, struct device *, void *);
+void mbattach(device_t, device_t, void *);
int mbprint(void *, const char *);
-int mbmatch(struct device *, struct cfdata *, void *);
+int mbmatch(device_t, cfdata_t, void *);
#include <sys/kernel.h>
@@ -157,10 +157,10 @@
* by checking for NULL.
*/
int
-amiga_config_found(struct cfdata *pcfp, struct device *pdp, void *auxp, cfprint_t pfn)
+amiga_config_found(cfdata_t pcfp, device_t pdp, void *auxp, cfprint_t pfn)
{
struct device temp;
- struct cfdata *cf;
+ cfdata_t cf;
const struct cfattach *ca;
if (amiga_realconfig)
@@ -195,7 +195,7 @@
void
config_console(void)
{
- struct cfdata *cf;
+ cfdata_t cf;
config_init();
@@ -229,11 +229,11 @@
/*
* mainbus driver
*/
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
mbmatch, mbattach, NULL, NULL);
int
-mbmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+mbmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
#if 0 /*
* XXX is this right? but we need to be found twice
@@ -254,7 +254,7 @@
* "find" all the things that should be there.
*/
void
-mbattach(struct device *pdp, struct device *dp, void *auxp)
+mbattach(device_t pdp, device_t dp, void *auxp)
{
printf("\n");
config_found(dp, __UNCONST("clock"), simple_devprint);
Index: src/sys/arch/amiga/dev/a2kbbc.c
diff -u src/sys/arch/amiga/dev/a2kbbc.c:1.22 src/sys/arch/amiga/dev/a2kbbc.c:1.23
--- src/sys/arch/amiga/dev/a2kbbc.c:1.22 Tue Feb 8 20:20:08 2011
+++ src/sys/arch/amiga/dev/a2kbbc.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: a2kbbc.c,v 1.22 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: a2kbbc.c,v 1.23 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.22 2011/02/08 20:20:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.23 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -55,10 +55,10 @@
#include <dev/clock_subr.h>
-int a2kbbc_match(struct device *, struct cfdata *, void *);
-void a2kbbc_attach(struct device *, struct device *, void *);
+int a2kbbc_match(device_t, cfdata_t, void *);
+void a2kbbc_attach(device_t, device_t, void *);
-CFATTACH_DECL(a2kbbc, sizeof(struct device),
+CFATTACH_DECL_NEW(a2kbbc, 0,
a2kbbc_match, a2kbbc_attach, NULL, NULL);
void *a2kclockaddr;
@@ -67,7 +67,7 @@
static struct todr_chip_handle a2ktodr;
int
-a2kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
+a2kbbc_match(device_t pdp, cfdata_t cfp, void *auxp)
{
struct clock_ymdhms dt;
static int a2kbbc_matched = 0;
@@ -98,7 +98,7 @@
* Attach us to the rtc function pointers.
*/
void
-a2kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
+a2kbbc_attach(device_t pdp, device_t dp, void *auxp)
{
printf("\n");
a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
Index: src/sys/arch/amiga/dev/a34kbbc.c
diff -u src/sys/arch/amiga/dev/a34kbbc.c:1.21 src/sys/arch/amiga/dev/a34kbbc.c:1.22
--- src/sys/arch/amiga/dev/a34kbbc.c:1.21 Tue Feb 8 20:20:08 2011
+++ src/sys/arch/amiga/dev/a34kbbc.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: a34kbbc.c,v 1.21 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: a34kbbc.c,v 1.22 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.21 2011/02/08 20:20:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.22 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -55,10 +55,10 @@
#include <dev/clock_subr.h>
-int a34kbbc_match(struct device *, struct cfdata *, void *);
-void a34kbbc_attach(struct device *, struct device *, void *);
+int a34kbbc_match(device_t, cfdata_t, void *);
+void a34kbbc_attach(device_t, device_t, void *);
-CFATTACH_DECL(a34kbbc, sizeof(struct device),
+CFATTACH_DECL_NEW(a34kbbc, 0,
a34kbbc_match, a34kbbc_attach, NULL, NULL);
void *a34kclockaddr;
@@ -67,7 +67,7 @@
static struct todr_chip_handle a34ktodr;
int
-a34kbbc_match(struct device *pdp, struct cfdata *cfp, void *auxp)
+a34kbbc_match(device_t pdp, cfdata_t cfp, void *auxp)
{
struct clock_ymdhms dt;
static int a34kbbc_matched = 0;
@@ -94,7 +94,7 @@
* Attach us to the rtc function pointers.
*/
void
-a34kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
+a34kbbc_attach(device_t pdp, device_t dp, void *auxp)
{
printf("\n");
a34kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
Index: src/sys/arch/amiga/dev/clock.c
diff -u src/sys/arch/amiga/dev/clock.c:1.52 src/sys/arch/amiga/dev/clock.c:1.53
--- src/sys/arch/amiga/dev/clock.c:1.52 Tue Feb 8 20:20:08 2011
+++ src/sys/arch/amiga/dev/clock.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.52 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: clock.c,v 1.53 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.52 2011/02/08 20:20:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.53 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -79,10 +79,10 @@
* periods where N is the value loaded into the counter.
*/
-int clockmatch(struct device *, struct cfdata *, void *);
-void clockattach(struct device *, struct device *, void *);
+int clockmatch(device_t, cfdata_t, void *);
+void clockattach(device_t, device_t, void *);
void cpu_initclocks(void);
-static void calibrate_delay(struct device *);
+static void calibrate_delay(device_t);
/* the clocks run at NTSC: 715.909kHz or PAL: 709.379kHz.
We're using a 100 Hz clock. */
@@ -103,11 +103,11 @@
NULL, /* next */
};
-CFATTACH_DECL(clock, sizeof(struct device),
+CFATTACH_DECL_NEW(clock, 0,
clockmatch, clockattach, NULL, NULL);
int
-clockmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+clockmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
if (matchname("clock", auxp))
return(1);
@@ -118,7 +118,7 @@
* Start the real-time clock.
*/
void
-clockattach(struct device *pdp, struct device *dp, void *auxp)
+clockattach(device_t pdp, device_t dp, void *auxp)
{
const char *clockchip;
unsigned short interval;
@@ -326,7 +326,7 @@
* off by 2.4%
*/
static void
-calibrate_delay(struct device *dp)
+calibrate_delay(device_t dp)
{
unsigned long t1, t2;
extern u_int32_t delaydivisor;
Index: src/sys/arch/amiga/dev/fd.c
diff -u src/sys/arch/amiga/dev/fd.c:1.85 src/sys/arch/amiga/dev/fd.c:1.86
--- src/sys/arch/amiga/dev/fd.c:1.85 Mon Dec 20 00:25:25 2010
+++ src/sys/arch/amiga/dev/fd.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.85 2010/12/20 00:25:25 matt Exp $ */
+/* $NetBSD: fd.c,v 1.86 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.85 2010/12/20 00:25:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.86 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -144,7 +144,7 @@
* floppy disk device data
*/
struct fd_softc {
- struct device sc_dv; /* generic device info; must come first */
+ device_t sc_dev; /* generic device info; must come first */
struct disk dkdev; /* generic disk info */
struct bufq_state *bufq;/* queue pending I/O operations */
struct buf curbuf; /* state of current I/O operation */
@@ -189,11 +189,11 @@
int unit;
};
-int fdcmatch(struct device *, struct cfdata *, void *);
-void fdcattach(struct device *, struct device *, void *);
+int fdcmatch(device_t, cfdata_t, void *);
+void fdcattach(device_t, device_t, void *);
int fdcprint(void *, const char *);
-int fdmatch(struct device *, struct cfdata *, void *);
-void fdattach(struct device *, struct device *, void *);
+int fdmatch(device_t, cfdata_t, void *);
+void fdattach(device_t, device_t, void *);
void fdintr(int);
void fdidxintr(void);
@@ -241,7 +241,7 @@
};
int nfdtype = __arraycount(fdtype);
-CFATTACH_DECL(fd, sizeof(struct fd_softc),
+CFATTACH_DECL_NEW(fd, sizeof(struct fd_softc),
fdmatch, fdattach, NULL, NULL);
extern struct cfdriver fd_cd;
@@ -264,7 +264,7 @@
struct dkdriver fddkdriver = { fdstrategy };
-CFATTACH_DECL(fdc, sizeof(struct device),
+CFATTACH_DECL_NEW(fdc, 0,
fdcmatch, fdcattach, NULL, NULL);
/*
@@ -325,7 +325,7 @@
int
-fdcmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+fdcmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
static int fdc_matched = 0;
@@ -342,7 +342,7 @@
}
void
-fdcattach(struct device *pdp, struct device *dp, void *auxp)
+fdcattach(device_t pdp, device_t dp, void *auxp)
{
struct fdcargs args;
@@ -374,7 +374,7 @@
/*ARGSUSED*/
int
-fdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+fdmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
struct fdcargs *fdap;
@@ -387,7 +387,7 @@
}
void
-fdattach(struct device *pdp, struct device *dp, void *auxp)
+fdattach(device_t pdp, device_t dp, void *auxp)
{
struct fdcargs *ap;
struct fd_softc *sc;
@@ -395,6 +395,7 @@
ap = auxp;
sc = device_private(dp);
+ sc->sc_dev = dp;
bufq_alloc(&sc->bufq, "disksort", BUFQ_SORT_CYLINDER);
callout_init(&sc->calibrate_ch, 0);
@@ -415,7 +416,7 @@
/*
* Initialize and attach the disk structure.
*/
- disk_init(&sc->dkdev, sc->sc_dv.dv_xname, &fddkdriver);
+ disk_init(&sc->dkdev, device_xname(sc->sc_dev), &fddkdriver);
disk_attach(&sc->dkdev);
/*
@@ -1467,8 +1468,8 @@
*/
sc->flags &= ~FDF_DIRTY;
if (timeo)
- printf("%s: write of track cache timed out.\n",
- sc->sc_dv.dv_xname);
+ aprint_error_dev(sc->sc_dev,
+ "write of track cache timed out.\n");
if (sc->flags & FDF_JUSTFLUSH) {
sc->flags &= ~FDF_JUSTFLUSH;
/*
@@ -1496,8 +1497,8 @@
else {
#ifdef FDDEBUG
if (timeo)
- printf("%s: fddmadone: cache load timed out.\n",
- sc->sc_dv.dv_xname);
+ aprint_debug_dev(sc->sc_dev,
+ "fddmadone: cache load timed out.\n");
#endif
if (sc->retried >= sc->retries) {
sc->retried = 0;
@@ -1579,7 +1580,7 @@
biodone(bp);
nobuf:
- fdfindwork(device_unit(&sc->sc_dv));
+ fdfindwork(device_unit(sc->sc_dev));
}
void
@@ -1789,8 +1790,8 @@
again:
if (doagain == 0 || (rp = srp = fdfindsync(srp, erp)) == NULL) {
#ifdef DIAGNOSTIC
- printf("%s: corrupted track (%d) data.\n",
- sc->sc_dv.dv_xname, sc->cachetrk);
+ aprint_error_dev(sc->sc_dev, "corrupted track (%d) data.\n",
+ sc->cachetrk);
#endif
return(-1);
}
@@ -1812,8 +1813,9 @@
}
if (((info >> 16) & 0xff) != sc->cachetrk) {
#ifdef DEBUG
- printf("%s: incorrect track found: 0x%lx %d\n",
- sc->sc_dv.dv_xname, info, sc->cachetrk);
+ aprint_debug_dev(sc->sc_dev,
+ "incorrect track found: 0x%lx %d\n",
+ info, sc->cachetrk);
#endif
goto again;
}
@@ -1952,8 +1954,9 @@
*/
if ((rp = (u_short *)fdfindsync((u_long *)rp, (u_long *)erp)) == NULL) {
#ifdef DIAGNOSTIC
- printf("%s: corrupted track (%d) data.\n",
- sc->sc_dv.dv_xname, sc->cachetrk);
+ aprint_normal_dev(sc->sc_dev,
+ "corrupted track (%d) data.\n",
+ sc->cachetrk);
#endif
return(-1);
}
Index: src/sys/arch/amiga/dev/grf.c
diff -u src/sys/arch/amiga/dev/grf.c:1.54 src/sys/arch/amiga/dev/grf.c:1.55
--- src/sys/arch/amiga/dev/grf.c:1.54 Tue Feb 8 20:20:08 2011
+++ src/sys/arch/amiga/dev/grf.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: grf.c,v 1.54 2011/02/08 20:20:08 rmind Exp $ */
+/* $NetBSD: grf.c,v 1.55 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.54 2011/02/08 20:20:08 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.55 2011/06/03 00:52:22 matt Exp $");
/*
* Graphics display driver for the Amiga
@@ -82,15 +82,15 @@
int grfoff(dev_t);
int grfsinfo(dev_t, struct grfdyninfo *);
-void grfattach(struct device *, struct device *, void *);
-int grfmatch(struct device *, struct cfdata *, void *);
+void grfattach(device_t, device_t, void *);
+int grfmatch(device_t, cfdata_t, void *);
int grfprint(void *, const char *);
/*
* pointers to grf drivers device structs
*/
struct grf_softc *grfsp[NGRF];
-CFATTACH_DECL(grf, sizeof(struct device),
+CFATTACH_DECL_NEW(grf, 0,
grfmatch, grfattach, NULL, NULL);
dev_type_open(grfopen);
@@ -106,14 +106,14 @@
/*
* only used in console init.
*/
-static struct cfdata *cfdata;
+static cfdata_t cfdata;
/*
* match if the unit of grf matches its perspective
* low level board driver.
*/
int
-grfmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+grfmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
if (cfp->cf_unit != ((struct grf_softc *)pdp)->g_unit)
@@ -128,7 +128,7 @@
* durring console init.
*/
void
-grfattach(struct device *pdp, struct device *dp, void *auxp)
+grfattach(device_t pdp, device_t dp, void *auxp)
{
struct grf_softc *gp;
int maj;
Index: src/sys/arch/amiga/dev/gvpbus.c
diff -u src/sys/arch/amiga/dev/gvpbus.c:1.24 src/sys/arch/amiga/dev/gvpbus.c:1.25
--- src/sys/arch/amiga/dev/gvpbus.c:1.24 Mon Oct 26 19:16:54 2009
+++ src/sys/arch/amiga/dev/gvpbus.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gvpbus.c,v 1.24 2009/10/26 19:16:54 cegger Exp $ */
+/* $NetBSD: gvpbus.c,v 1.25 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gvpbus.c,v 1.24 2009/10/26 19:16:54 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gvpbus.c,v 1.25 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -40,17 +40,17 @@
#include <amiga/dev/zbusvar.h>
#include <amiga/dev/gvpbusvar.h>
-void gvpbusattach(struct device *, struct device *, void *);
-int gvpbusmatch(struct device *, struct cfdata *, void *);
+void gvpbusattach(device_t, device_t, void *);
+int gvpbusmatch(device_t, cfdata_t, void *);
int gvpbusprint(void *auxp, const char *);
extern int sbic_no_dma; /* Kludge for A1291 - mlh */
-CFATTACH_DECL(gvpbus, sizeof(struct device),
+CFATTACH_DECL_NEW(gvpbus, 0,
gvpbusmatch, gvpbusattach, NULL, NULL);
int
-gvpbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+gvpbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
struct zbus_args *zap;
@@ -69,7 +69,7 @@
}
void
-gvpbusattach(struct device *pdp, struct device *dp, void *auxp)
+gvpbusattach(device_t pdp, device_t dp, void *auxp)
{
struct zbus_args *zap;
struct gvpbus_args ga;
Index: src/sys/arch/amiga/dev/kbd.c
diff -u src/sys/arch/amiga/dev/kbd.c:1.53 src/sys/arch/amiga/dev/kbd.c:1.54
--- src/sys/arch/amiga/dev/kbd.c:1.53 Sat Dec 12 13:10:36 2009
+++ src/sys/arch/amiga/dev/kbd.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.53 2009/12/12 13:10:36 phx Exp $ */
+/* $NetBSD: kbd.c,v 1.54 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.53 2009/12/12 13:10:36 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.54 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -143,14 +143,14 @@
int k_console; /* true if used as console keyboard */
#if NWSKBD>0
- struct device *k_wskbddev; /* pointer to wskbd for sending strokes */
+ device_t k_wskbddev; /* pointer to wskbd for sending strokes */
int k_pollingmode; /* polling mode on? whatever it isss... */
#endif
};
struct kbd_softc kbd_softc;
-int kbdmatch(struct device *, struct cfdata *, void *);
-void kbdattach(struct device *, struct device *, void *);
+int kbdmatch(device_t, cfdata_t, void *);
+void kbdattach(device_t, device_t, void *);
void kbdintr(int);
void kbdstuffchar(u_char);
@@ -160,7 +160,7 @@
int drkbdputc2(u_int8_t, u_int8_t);
int drkbdwaitfor(int);
-CFATTACH_DECL(kbd, sizeof(struct device),
+CFATTACH_DECL_NEW(kbd, 0,
kbdmatch, kbdattach, NULL, NULL);
dev_type_open(kbdopen);
@@ -177,7 +177,7 @@
/*ARGSUSED*/
int
-kbdmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+kbdmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
if (matchname((char *)auxp, "kbd"))
@@ -187,7 +187,7 @@
/*ARGSUSED*/
void
-kbdattach(struct device *pdp, struct device *dp, void *auxp)
+kbdattach(device_t pdp, device_t dp, void *auxp)
{
#ifdef DRACO
kbdenable();
Index: src/sys/arch/amiga/dev/msc.c
diff -u src/sys/arch/amiga/dev/msc.c:1.43 src/sys/arch/amiga/dev/msc.c:1.44
--- src/sys/arch/amiga/dev/msc.c:1.43 Sun Apr 24 16:26:52 2011
+++ src/sys/arch/amiga/dev/msc.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $ */
+/* $NetBSD: msc.c,v 1.44 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.43 2011/04/24 16:26:52 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msc.c,v 1.44 2011/06/03 00:52:22 matt Exp $");
#include "msc.h"
@@ -207,13 +207,13 @@
int mscmctl(dev_t dev, int bits, int howto);
void mscmint(register void *data);
-int mscmatch(struct device *, struct cfdata *, void *);
-void mscattach(struct device *, struct device *, void *);
+int mscmatch(device_t, cfdata_t, void *);
+void mscattach(device_t, device_t, void *);
#define SWFLAGS(dev) (msc->openflags | (MSCDIALIN(dev) ? 0 : TIOCFLAG_SOFTCAR))
#define DEBUG_CD 0
-CFATTACH_DECL(msc, sizeof(struct device),
+CFATTACH_DECL_NEW(msc, 0,
mscmatch, mscattach, NULL, NULL);
dev_type_open(mscopen);
@@ -231,7 +231,7 @@
};
int
-mscmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+mscmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
struct zbus_args *zap;
@@ -243,7 +243,7 @@
}
void
-mscattach(struct device *pdp, struct device *dp, void *auxp)
+mscattach(device_t pdp, device_t dp, void *auxp)
{
volatile struct mscmemory *mscmem;
struct mscdevice *msc;
Index: src/sys/arch/amiga/dev/zbus.c
diff -u src/sys/arch/amiga/dev/zbus.c:1.62 src/sys/arch/amiga/dev/zbus.c:1.63
--- src/sys/arch/amiga/dev/zbus.c:1.62 Mon Dec 20 00:25:26 2010
+++ src/sys/arch/amiga/dev/zbus.c Fri Jun 3 00:52:22 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: zbus.c,v 1.62 2010/12/20 00:25:26 matt Exp $ */
+/* $NetBSD: zbus.c,v 1.63 2011/06/03 00:52:22 matt Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.62 2010/12/20 00:25:26 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.63 2011/06/03 00:52:22 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -218,9 +218,9 @@
static int npreconfent = sizeof(preconftab) / sizeof(struct preconfdata);
-void zbusattach(struct device *, struct device *, void *);
+void zbusattach(device_t, device_t, void *);
int zbusprint(void *, const char *);
-int zbusmatch(struct device *, struct cfdata *, void *);
+int zbusmatch(device_t, cfdata_t, void *);
void *zbusmap(void *, u_int);
static const char *aconflookup(int, int);
@@ -244,14 +244,14 @@
* mainbus driver
*/
-CFATTACH_DECL(zbus, sizeof(struct device),
+CFATTACH_DECL_NEW(zbus, 0,
zbusmatch, zbusattach, NULL, NULL);
-static struct cfdata *early_cfdata;
+static cfdata_t early_cfdata;
/*ARGSUSED*/
int
-zbusmatch(struct device *pdp, struct cfdata *cfp, void *auxp)
+zbusmatch(device_t pdp, cfdata_t cfp, void *auxp)
{
if (matchname(auxp, "zbus") == 0)
@@ -267,7 +267,7 @@
* with that driver if matched else print a diag.
*/
void
-zbusattach(struct device *pdp, struct device *dp, void *auxp)
+zbusattach(device_t pdp, device_t dp, void *auxp)
{
struct zbus_args za;
struct preconfdata *pcp, *epcp;