Module Name: src Committed By: tsutsui Date: Sat Oct 13 06:12:23 UTC 2012
Modified Files: src/sys/arch/hp300/dev: hpib.c hpibvar.h rd.c src/sys/arch/hp300/hp300: autoconf.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.38 -r1.39 src/sys/arch/hp300/dev/hpib.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/hp300/dev/hpibvar.h cvs rdiff -u -r1.92 -r1.93 src/sys/arch/hp300/dev/rd.c cvs rdiff -u -r1.100 -r1.101 src/sys/arch/hp300/hp300/autoconf.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/hp300/dev/hpib.c diff -u src/sys/arch/hp300/dev/hpib.c:1.38 src/sys/arch/hp300/dev/hpib.c:1.39 --- src/sys/arch/hp300/dev/hpib.c:1.38 Fri Jun 13 09:41:15 2008 +++ src/sys/arch/hp300/dev/hpib.c Sat Oct 13 06:12:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hpib.c,v 1.38 2008/06/13 09:41:15 cegger Exp $ */ +/* $NetBSD: hpib.c,v 1.39 2012/10/13 06:12:23 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.38 2008/06/13 09:41:15 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpib.c,v 1.39 2012/10/13 06:12:23 tsutsui Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -267,7 +267,7 @@ hpibreset(int unit) } int -hpibreq(struct device *pdev, struct hpibqueue *hq) +hpibreq(device_t pdev, struct hpibqueue *hq) { struct hpibbus_softc *sc = device_private(pdev); int s; @@ -283,7 +283,7 @@ hpibreq(struct device *pdev, struct hpib } void -hpibfree(struct device *pdev, struct hpibqueue *hq) +hpibfree(device_t pdev, struct hpibqueue *hq) { struct hpibbus_softc *sc = device_private(pdev); int s; Index: src/sys/arch/hp300/dev/hpibvar.h diff -u src/sys/arch/hp300/dev/hpibvar.h:1.20 src/sys/arch/hp300/dev/hpibvar.h:1.21 --- src/sys/arch/hp300/dev/hpibvar.h:1.20 Mon Apr 28 20:23:19 2008 +++ src/sys/arch/hp300/dev/hpibvar.h Sat Oct 13 06:12:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: hpibvar.h,v 1.20 2008/04/28 20:23:19 martin Exp $ */ +/* $NetBSD: hpibvar.h,v 1.21 2012/10/13 06:12:23 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -206,8 +206,8 @@ void hpibawait(int); int hpibswait(int, int); int hpibid(int, int); -int hpibreq(struct device *, struct hpibqueue *); -void hpibfree(struct device *, struct hpibqueue *); +int hpibreq(device_t, struct hpibqueue *); +void hpibfree(device_t, struct hpibqueue *); int hpibintr(void *); int hpibdevprint(void *, const char *); Index: src/sys/arch/hp300/dev/rd.c diff -u src/sys/arch/hp300/dev/rd.c:1.92 src/sys/arch/hp300/dev/rd.c:1.93 --- src/sys/arch/hp300/dev/rd.c:1.92 Thu Feb 2 19:42:59 2012 +++ src/sys/arch/hp300/dev/rd.c Sat Oct 13 06:12:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rd.c,v 1.92 2012/02/02 19:42:59 tls Exp $ */ +/* $NetBSD: rd.c,v 1.93 2012/10/13 06:12:23 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.92 2012/02/02 19:42:59 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.93 2012/10/13 06:12:23 tsutsui Exp $"); #include "opt_useleds.h" @@ -245,7 +245,7 @@ static const struct rdidentinfo rdidenti }; static const int numrdidentinfo = __arraycount(rdidentinfo); -static int rdident(struct device *, struct rd_softc *, +static int rdident(device_t, struct rd_softc *, struct hpibbus_attach_args *); static void rdreset(struct rd_softc *); static void rdustart(struct rd_softc *); Index: src/sys/arch/hp300/hp300/autoconf.c diff -u src/sys/arch/hp300/hp300/autoconf.c:1.100 src/sys/arch/hp300/hp300/autoconf.c:1.101 --- src/sys/arch/hp300/hp300/autoconf.c:1.100 Sun Jul 29 18:05:43 2012 +++ src/sys/arch/hp300/hp300/autoconf.c Sat Oct 13 06:12:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.101 2012/10/13 06:12:23 tsutsui Exp $ */ /*- * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.100 2012/07/29 18:05:43 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.101 2012/10/13 06:12:23 tsutsui Exp $"); #include "dvbox.h" #include "gbox.h" @@ -209,7 +209,7 @@ int extio_ex_malloc_safe; struct dev_data { LIST_ENTRY(dev_data) dd_list; /* dev_data_list */ LIST_ENTRY(dev_data) dd_clist; /* ctlr list */ - struct device *dd_dev; /* device described by this entry */ + device_t dd_dev; /* device described by this entry */ int dd_scode; /* select code of device */ int dd_slave; /* ...or slave */ int dd_punit; /* and punit... */ @@ -223,7 +223,7 @@ static void findbootdev(void); static void findbootdev_slave(ddlist_t *, int, int, int); static void setbootdev(void); -static struct dev_data *dev_data_lookup(struct device *); +static struct dev_data *dev_data_lookup(device_t); static void dev_data_insert(struct dev_data *, ddlist_t *); static int mainbusmatch(device_t, cfdata_t, void *); @@ -300,7 +300,7 @@ void cpu_rootconf(void) { struct dev_data *dd; - struct device *dv; + device_t dv; struct vfsops *vops; /* @@ -320,7 +320,7 @@ cpu_rootconf(void) B_PARTITION(bootdev)); bootdev = 0; /* invalidate bootdev */ } else { - printf("boot device: %s\n", booted_device->dv_xname); + printf("boot device: %s\n", device_xname(booted_device)); } } @@ -376,7 +376,7 @@ cpu_rootconf(void) * used to attach it. This is used to find the boot device. */ void -device_register(struct device *dev, void *aux) +device_register(device_t dev, void *aux) { struct dev_data *dd; static int seen_netdevice = 0; @@ -517,7 +517,7 @@ findbootdev(void) (type == 2 && !device_is_a(booted_device, "rd"))) { printf("WARNING: boot device/type mismatch!\n"); printf("device = %s, type = %d\n", - booted_device->dv_xname, type); + device_xname(booted_device), type); booted_device = NULL; } goto out; @@ -538,7 +538,7 @@ findbootdev(void) if ((type == 4 && !device_is_a(booted_device, "sd"))) { printf("WARNING: boot device/type mismatch!\n"); printf("device = %s, type = %d\n", - booted_device->dv_xname, type); + device_xname(booted_device), type); booted_device = NULL; } goto out; @@ -683,7 +683,7 @@ setbootdev(void) * Return the dev_data corresponding to the given device. */ static struct dev_data * -dev_data_lookup(struct device *dev) +dev_data_lookup(device_t dev) { struct dev_data *dd; @@ -705,7 +705,7 @@ dev_data_insert(struct dev_data *dd, ddl #ifdef DIAGNOSTIC if (dd->dd_scode < 0 || dd->dd_scode > 255) { - printf("bogus select code for %s\n", dd->dd_dev->dv_xname); + printf("bogus select code for %s\n", device_xname(dd->dd_dev)); panic("dev_data_insert"); } #endif