Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sun3 struct device * -> device_t, struct cfdata * -...
details: https://anonhg.NetBSD.org/src/rev/573d93f5ecb5
branches: trunk
changeset: 782025:573d93f5ecb5
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Oct 13 06:37:16 2012 +0000
description:
struct device * -> device_t, struct cfdata * -> cfdata_t
use device_xname() (from chs@)
diffstat:
sys/arch/sun3/dev/fd.c | 6 +++---
sys/arch/sun3/include/autoconf.h | 4 ++--
sys/arch/sun3/sun3/autoconf.c | 24 ++++++++++++------------
sys/arch/sun3/sun3x/obio.c | 6 +++---
sys/arch/sun3/sun3x/vme.c | 8 ++++----
5 files changed, 24 insertions(+), 24 deletions(-)
diffs (186 lines):
diff -r 3a0cffc025ae -r 573d93f5ecb5 sys/arch/sun3/dev/fd.c
--- a/sys/arch/sun3/dev/fd.c Sat Oct 13 06:35:54 2012 +0000
+++ b/sys/arch/sun3/dev/fd.c Sat Oct 13 06:37:16 2012 +0000
@@ -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 @@
}
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);
diff -r 3a0cffc025ae -r 573d93f5ecb5 sys/arch/sun3/include/autoconf.h
--- a/sys/arch/sun3/include/autoconf.h Sat Oct 13 06:35:54 2012 +0000
+++ b/sys/arch/sun3/include/autoconf.h Sat Oct 13 06:37:16 2012 +0000
@@ -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 @@
#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);
diff -r 3a0cffc025ae -r 573d93f5ecb5 sys/arch/sun3/sun3/autoconf.c
--- a/sys/arch/sun3/sun3/autoconf.c Sat Oct 13 06:35:54 2012 +0000
+++ b/sys/arch/sun3/sun3/autoconf.c Sat Oct 13 06:37:16 2012 +0000
@@ -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 @@
* 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 @@
/****************************************************************/
/* 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 @@
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 @@
/*
* 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 @@
* 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 @@
* 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);
diff -r 3a0cffc025ae -r 573d93f5ecb5 sys/arch/sun3/sun3x/obio.c
--- a/sys/arch/sun3/sun3x/obio.c Sat Oct 13 06:35:54 2012 +0000
+++ b/sys/arch/sun3/sun3x/obio.c Sat Oct 13 06:37:16 2012 +0000
@@ -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 @@
#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);
diff -r 3a0cffc025ae -r 573d93f5ecb5 sys/arch/sun3/sun3x/vme.c
--- a/sys/arch/sun3/sun3x/vme.c Sat Oct 13 06:35:54 2012 +0000
+++ b/sys/arch/sun3/sun3x/vme.c Sat Oct 13 06:37:16 2012 +0000
@@ -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 @@
{ 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;
Home |
Main Index |
Thread Index |
Old Index