Module Name: src
Committed By: tsutsui
Date: Sat Oct 13 06:37:17 UTC 2012
Modified Files:
src/sys/arch/sun3/dev: fd.c
src/sys/arch/sun3/include: autoconf.h
src/sys/arch/sun3/sun3: autoconf.c
src/sys/arch/sun3/sun3x: obio.c vme.c
Log Message:
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sun3/dev/fd.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sun3/include/autoconf.h
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/sun3/sun3/autoconf.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/sun3/sun3x/obio.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sun3/sun3x/vme.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/sun3/dev/fd.c
diff -u src/sys/arch/sun3/dev/fd.c:1.72 src/sys/arch/sun3/dev/fd.c:1.73
--- src/sys/arch/sun3/dev/fd.c:1.72 Sat Jul 16 20:25:28 2011
+++ src/sys/arch/sun3/dev/fd.c Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $ */
+/* $NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.73 2012/10/13 06:37:16 tsutsui Exp $");
#include "opt_ddb.h"
@@ -396,7 +396,7 @@ fdconf(struct fdc_softc *fdc)
}
void
-fdcattach(struct device *parent, struct device *self, void *aux)
+fdcattach(device_t parent, device_t self, void *aux)
{
struct confargs *ca = aux;
struct fdc_softc *fdc = device_private(self);
Index: src/sys/arch/sun3/include/autoconf.h
diff -u src/sys/arch/sun3/include/autoconf.h:1.26 src/sys/arch/sun3/include/autoconf.h:1.27
--- src/sys/arch/sun3/include/autoconf.h:1.26 Mon Apr 28 20:23:38 2008
+++ src/sys/arch/sun3/include/autoconf.h Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.h,v 1.26 2008/04/28 20:23:38 martin Exp $ */
+/* $NetBSD: autoconf.h,v 1.27 2012/10/13 06:37:16 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ extern struct sun68k_bus_space_tag mainb
#define cf_intpri cf_loc[1]
#define cf_intvec cf_loc[2]
-int bus_scan(struct device *, struct cfdata *, const int *, void *);
+int bus_scan(device_t, cfdata_t, const int *, void *);
int bus_print(void *, const char *);
int bus_peek(int, int, int);
void *bus_mapin(int, int, int);
Index: src/sys/arch/sun3/sun3/autoconf.c
diff -u src/sys/arch/sun3/sun3/autoconf.c:1.77 src/sys/arch/sun3/sun3/autoconf.c:1.78
--- src/sys/arch/sun3/sun3/autoconf.c:1.77 Mon Jul 30 17:21:31 2012
+++ src/sys/arch/sun3/sun3/autoconf.c Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.77 2012/07/30 17:21:31 christos Exp $ */
+/* $NetBSD: autoconf.c,v 1.78 2012/10/13 06:37:16 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.77 2012/07/30 17:21:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.78 2012/10/13 06:37:16 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,7 @@ cpu_configure(void)
* setup the confargs for each child match and attach call.
*/
int
-bus_scan(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+bus_scan(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
{
struct confargs *ca = aux;
@@ -154,13 +154,13 @@ bus_print(void *args, const char *name)
/****************************************************************/
/* This takes the args: name, ctlr, unit */
-typedef struct device * (*findfunc_t)(char *, int, int);
+typedef device_t (*findfunc_t)(char *, int, int);
-static struct device * net_find (char *, int, int);
+static device_t net_find(char *, int, int);
#if NSCSIBUS > 0
-static struct device * scsi_find(char *, int, int);
+static device_t scsi_find(char *, int, int);
#endif
-static struct device * xx_find (char *, int, int);
+static device_t xx_find(char *, int, int);
struct prom_n2f {
const char name[4];
@@ -218,7 +218,7 @@ cpu_rootconf(void)
if (find)
booted_device = (*find)(promname, bp->ctlrNum, bp->unitNum);
if (booted_device) {
- devname = booted_device->dv_xname;
+ devname = device_xname(booted_device);
if (device_class(booted_device) == DV_DISK) {
booted_partition = bp->partNum & 7;
partname[0] = 'a' + booted_partition;
@@ -237,7 +237,7 @@ cpu_rootconf(void)
/*
* Network device: Just use controller number.
*/
-static struct device *
+static device_t
net_find(char *name, int ctlr, int unit)
{
return device_find_by_driver_unit(name, ctlr);
@@ -248,10 +248,10 @@ net_find(char *name, int ctlr, int unit)
* SCSI device: The controller number corresponds to the
* scsibus number, and the unit number is (targ*8 + LUN).
*/
-static struct device *
+static device_t
scsi_find(char *name, int ctlr, int unit)
{
- struct device *scsibus;
+ device_t scsibus;
struct scsibus_softc *sbsc;
struct scsipi_periph *periph;
int target, lun;
@@ -278,7 +278,7 @@ scsi_find(char *name, int ctlr, int unit
* Xylogics SMD disk: (xy, xd)
* Assume wired-in unit numbers for now...
*/
-static struct device *
+static device_t
xx_find(char *name, int ctlr, int unit)
{
return device_find_by_driver_unit(name, ctlr * 2 + unit);
Index: src/sys/arch/sun3/sun3x/obio.c
diff -u src/sys/arch/sun3/sun3x/obio.c:1.32 src/sys/arch/sun3/sun3x/obio.c:1.33
--- src/sys/arch/sun3/sun3x/obio.c:1.32 Sat Jun 28 12:13:38 2008
+++ src/sys/arch/sun3/sun3x/obio.c Sat Oct 13 06:37:16 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.32 2008/06/28 12:13:38 tsutsui Exp $ */
+/* $NetBSD: obio.c,v 1.33 2012/10/13 06:37:16 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.32 2008/06/28 12:13:38 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.33 2012/10/13 06:37:16 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -157,7 +157,7 @@ static paddr_t obio_alist[] = {
#define OBIO_ALIST_LEN __arraycount(obio_alist)
static void
-obio_attach(struct device *parent, struct device *self, void *aux)
+obio_attach(device_t parent, device_t self, void *aux)
{
struct confargs *ca = aux;
struct obio_softc *sc = device_private(self);
Index: src/sys/arch/sun3/sun3x/vme.c
diff -u src/sys/arch/sun3/sun3x/vme.c:1.15 src/sys/arch/sun3/sun3x/vme.c:1.16
--- src/sys/arch/sun3/sun3x/vme.c:1.15 Sat Jun 28 12:13:38 2008
+++ src/sys/arch/sun3/sun3x/vme.c Sat Oct 13 06:37:17 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: vme.c,v 1.15 2008/06/28 12:13:38 tsutsui Exp $ */
+/* $NetBSD: vme.c,v 1.16 2012/10/13 06:37:17 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.15 2008/06/28 12:13:38 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.16 2012/10/13 06:37:17 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -70,8 +70,8 @@ static const struct {
{ BUS_VME32D32, "A32/D32", PMAP_VME32, VME32_BASE, VME32_MASK },
};
-static int vme_match(struct device *, struct cfdata *, void *);
-static void vme_attach(struct device *, struct device *, void *);
+static int vme_match(device_t, cfdata_t, void *);
+static void vme_attach(device_t, device_t, void *);
struct vme_softc {
device_t sc_dev;