Module Name: src
Committed By: cegger
Date: Tue May 12 07:07:44 UTC 2009
Modified Files:
src/sys/arch/acorn32/mainbus: fd.c pioc.c
Log Message:
use device_xname()
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/acorn32/mainbus/fd.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/acorn32/mainbus/pioc.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/acorn32/mainbus/fd.c
diff -u src/sys/arch/acorn32/mainbus/fd.c:1.45 src/sys/arch/acorn32/mainbus/fd.c:1.46
--- src/sys/arch/acorn32/mainbus/fd.c:1.45 Sat Mar 14 21:04:01 2009
+++ src/sys/arch/acorn32/mainbus/fd.c Tue May 12 07:07:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.45 2009/03/14 21:04:01 dsl Exp $ */
+/* $NetBSD: fd.c,v 1.46 2009/05/12 07:07:44 cegger Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.45 2009/03/14 21:04:01 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.46 2009/05/12 07:07:44 cegger Exp $");
#include "opt_ddb.h"
@@ -282,7 +282,7 @@
struct dkdriver fddkdriver = { fdstrategy };
-struct fd_type *fd_nvtotype(char *, int, int);
+struct fd_type *fd_nvtotype(const char *, int, int);
void fd_set_motor(struct fdc_softc *fdc, int reset);
void fd_motor_off(void *arg);
void fd_motor_on(void *arg);
@@ -408,7 +408,7 @@
/* physical limit: four drives per controller. */
for (fa.fa_drive = 0; fa.fa_drive < 4; fa.fa_drive++) {
if (type >= 0 && fa.fa_drive < 2)
- fa.fa_deftype = fd_nvtotype(fdc->sc_dev.dv_xname,
+ fa.fa_deftype = fd_nvtotype(device_xname(&fdc->sc_dev),
type, fa.fa_drive);
else
fa.fa_deftype = NULL; /* unknown */
@@ -500,7 +500,7 @@
/*
* Initialize and attach the disk structure.
*/
- disk_init(&fd->sc_dk, fd->sc_dev.dv_xname, &fddkdriver);
+ disk_init(&fd->sc_dk, device_xname(&fd->sc_dev), &fddkdriver);
disk_attach(&fd->sc_dk);
/* Needed to power off if the motor is on when we halt. */
@@ -512,7 +512,7 @@
* none/unknown/unusable.
*/
struct fd_type *
-fd_nvtotype(char *fdc, int nvraminfo, int drive)
+fd_nvtotype(const char *fdc, int nvraminfo, int drive)
{
int type;
@@ -849,7 +849,7 @@
n = 2;
}
- printf("%s: %s", dv->dv_xname, s);
+ printf("%s: %s", device_xname(dv), s);
fdcpstatus(n, fdc);
}
Index: src/sys/arch/acorn32/mainbus/pioc.c
diff -u src/sys/arch/acorn32/mainbus/pioc.c:1.14 src/sys/arch/acorn32/mainbus/pioc.c:1.15
--- src/sys/arch/acorn32/mainbus/pioc.c:1.14 Sat Mar 14 15:35:58 2009
+++ src/sys/arch/acorn32/mainbus/pioc.c Tue May 12 07:07:44 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: pioc.c,v 1.14 2009/03/14 15:35:58 dsl Exp $ */
+/* $NetBSD: pioc.c,v 1.15 2009/05/12 07:07:44 cegger Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -41,7 +41,7 @@
/*#define PIOC_DEBUG*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.14 2009/03/14 15:35:58 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pioc.c,v 1.15 2009/05/12 07:07:44 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -305,7 +305,7 @@
if (id != PIOC_CM_ID_665)
piocgetid(iot, ioh, PIOC_CM_ENTER_666, &id, &rev);
- printf("\n%s: ", self->dv_xname);
+ printf("\n%s: ", device_xname(self));
/* Do we recognise it ? */
switch (id) {
@@ -344,7 +344,7 @@
bus_space_write_1(iot, ioh, PIOC_CM_SELECT_REG, PIOC_CM_EXIT);
#ifdef PIOC_DEBUG
- printf("%s: ", self->dv_xname);
+ printf("%s: ", device_xname(self));
for (loop = 0; loop < PIOC_CM_REGS; ++loop)
printf("%02x ", sc->sc_config[loop]);