use aprint_*_dev and device_xname

This commit is contained in:
cegger 2008-04-05 16:35:35 +00:00
parent 5f256bd3f7
commit 395c8c3fd3
27 changed files with 99 additions and 100 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: spiflash.c,v 1.6 2007/07/29 12:15:44 ad Exp $ */
/* $NetBSD: spiflash.c,v 1.7 2008/04/05 16:41:24 cegger Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.6 2007/07/29 12:15:44 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: spiflash.c,v 1.7 2008/04/05 16:41:24 cegger Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@ -221,8 +221,8 @@ spiflash_attach(struct device *parent, struct device *self, void *aux)
aprint_naive(": SPI flash\n");
aprint_normal(": %s SPI flash\n", sc->sc_name);
/* XXX: note that this has to change for boot-sectored flash */
aprint_normal("%s: %d KB, %d sectors of %d KB each\n",
sc->sc_dev.dv_xname, sc->sc_device_size / 1024,
aprint_normal_dev(&sc->sc_dev, "%d KB, %d sectors of %d KB each\n",
sc->sc_device_size / 1024,
sc->sc_device_size / sc->sc_erase_size,
sc->sc_erase_size / 1024);
@ -232,7 +232,7 @@ spiflash_attach(struct device *parent, struct device *self, void *aux)
bufq_alloc(&sc->sc_doneq, "fcfs", BUFQ_SORT_RAWBLOCK);
sc->sc_dk.dk_driver = &spiflash_dkdriver;
sc->sc_dk.dk_name = sc->sc_dev.dv_xname;
sc->sc_dk.dk_name = device_xname(&sc->sc_dev);
disk_attach(&sc->sc_dk);

View File

@ -1,4 +1,4 @@
/* $NetBSD: asc_tc.c,v 1.31 2007/10/19 12:01:19 ad Exp $ */
/* $NetBSD: asc_tc.c,v 1.32 2008/04/05 16:44:41 cegger Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.31 2007/10/19 12:01:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.32 2008/04/05 16:44:41 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -144,7 +144,7 @@ asc_tc_attach(struct device *parent, struct device *self, void *aux)
asc->sc_dmat = ta->ta_dmat;
if (bus_space_map(asc->sc_bst, ta->ta_addr,
PMAZ_OFFSET_RAM + PMAZ_RAM_SIZE, 0, &asc->sc_bsh)) {
printf("%s: unable to map device\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "unable to map device\n");
return;
}
asc->sc_base = (void *)ta->ta_addr; /* XXX XXX XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: bba.c,v 1.32 2007/10/19 12:01:19 ad Exp $ */
/* $NetBSD: bba.c,v 1.33 2008/04/05 16:44:41 cegger Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
/* maxine/alpha baseboard audio (bba) */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.32 2007/10/19 12:01:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: bba.c,v 1.33 2008/04/05 16:44:41 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -228,7 +228,7 @@ bba_attach(struct device *parent, struct device *self, void *aux)
/* get the bus space handle for codec */
if (bus_space_subregion(sc->sc_bst, sc->sc_bsh,
ia->iada_offset, 0, &sc->sc_codec_bsh)) {
printf("%s: unable to map device\n", asc->sc_dev.dv_xname);
aprint_error_dev(&asc->sc_dev, "unable to map device\n");
return;
}
@ -314,15 +314,14 @@ bba_allocm(void *addr, int direction, size_t size,
if (bus_dmamem_alloc(sc->sc_dmat, size, BBA_DMABUF_ALIGN,
BBA_DMABUF_BOUNDARY, &seg, 1, &rseg, w)) {
printf("%s: can't allocate DMA buffer\n",
asc->sc_dev.dv_xname);
aprint_error_dev(&asc->sc_dev, "can't allocate DMA buffer\n");
goto bad;
}
state |= 1;
if (bus_dmamem_map(sc->sc_dmat, &seg, rseg, size,
&kva, w | BUS_DMA_COHERENT)) {
printf("%s: can't map DMA buffer\n", asc->sc_dev.dv_xname);
aprint_error_dev(&asc->sc_dev, "can't map DMA buffer\n");
goto bad;
}
state |= 2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fta.c,v 1.24 2007/03/04 06:02:46 christos Exp $ */
/* $NetBSD: if_fta.c,v 1.25 2008/04/05 16:44:41 cegger Exp $ */
/*-
* Copyright (c) 1996 Matt Thomas <matt@3am-software.com>
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1.24 2007/03/04 06:02:46 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_fta.c,v 1.25 2008/04/05 16:44:41 cegger Exp $");
#include "opt_inet.h"
@ -92,13 +92,14 @@ pdq_tc_attach(
*/
sc->sc_dmatag = ta->ta_dmat;
sc->sc_csrtag = ta->ta_memt;
bcopy(sc->sc_dev.dv_xname, sc->sc_if.if_xname, IFNAMSIZ);
memcpy(sc->sc_if.if_xname, device_xname(&sc->sc_dev), IFNAMSIZ);
sc->sc_if.if_flags = 0;
sc->sc_if.if_softc = sc;
if (bus_space_map(sc->sc_csrtag, ta->ta_addr + PDQ_TC_CSR_OFFSET,
PDQ_TC_CSR_SPACE, 0, &sc->sc_membase)) {
printf("\n%s: can't map card memory!\n", sc->sc_dev.dv_xname);
aprint_normal("\n");
aprint_error_dev(&sc->sc_dev, "can't map card memory!\n");
return;
}
@ -106,7 +107,7 @@ pdq_tc_attach(
sc->sc_if.if_xname, 0,
(void *) sc, PDQ_DEFTA);
if (sc->sc_pdq == NULL) {
printf("%s: initialization failed\n", sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "initialization failed\n");
return;
}
@ -117,7 +118,7 @@ pdq_tc_attach(
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq);
if (sc->sc_ats == NULL)
printf("%s: warning: couldn't establish shutdown hook\n", self->dv_xname);
aprint_error_dev(self, "warning: couldn't establish shutdown hook\n");
}
CFATTACH_DECL(fta, sizeof(pdq_softc_t),

View File

@ -1,4 +1,4 @@
/* $NetBSD: px.c,v 1.31 2007/10/19 12:01:19 ad Exp $ */
/* $NetBSD: px.c,v 1.32 2008/04/05 16:44:41 cegger Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.31 2007/10/19 12:01:19 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.32 2008/04/05 16:44:41 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -268,7 +268,7 @@ px_intr(void *cookie)
* Simply clear the flag and report the error.
*/
if ((state & STIC_INT_E) != 0) {
printf("%s: error intr, %x %x %x %x %x", px->px_dv.dv_xname,
aprint_error_dev(&px->px_dv, "error intr, %x %x %x %x %x",
sr->sr_ipdvint, sr->sr_sticsr, sr->sr_buscsr,
sr->sr_busadr, sr->sr_busdat);
sr->sr_ipdvint = STIC_INT_E_WE | STIC_INT_E_EN;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcds.c,v 1.20 2007/10/19 12:01:20 ad Exp $ */
/* $NetBSD: tcds.c,v 1.21 2008/04/05 16:44:41 cegger Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.20 2007/10/19 12:01:20 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.21 2008/04/05 16:44:41 cegger Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -183,7 +183,7 @@ tcdsattach(struct device *parent, struct device *self, void *aux)
*/
if (bus_space_map(sc->sc_bst, ta->ta_addr,
(TCDS_SCSI1_OFFSET + 0x100), 0, &sc->sc_bsh)) {
printf("%s: unable to map device\n", sc->sc_dv.dv_xname);
aprint_error_dev(&sc->sc_dv, "unable to map device\n");
return;
}
@ -194,8 +194,7 @@ tcdsattach(struct device *parent, struct device *self, void *aux)
0x100, &sbsh[0]) ||
bus_space_subregion(sc->sc_bst, sc->sc_bsh, TCDS_SCSI1_OFFSET,
0x100, &sbsh[1])) {
printf("%s: unable to subregion SCSI chip space\n",
sc->sc_dv.dv_xname);
aprint_error_dev(&sc->sc_dv, "unable to subregion SCSI chip space\n");
return;
}
@ -233,7 +232,7 @@ tcdsattach(struct device *parent, struct device *self, void *aux)
cp = slotc->sc_name;
snprintf(cp, sizeof(slotc->sc_name), "chip %d", i);
evcnt_attach_dynamic(&slotc->sc_evcnt, EVCNT_TYPE_INTR,
pevcnt, sc->sc_dv.dv_xname, cp);
pevcnt, device_xname(&sc->sc_dv), cp);
slotc->sc_slot = i;
slotc->sc_bst = sc->sc_bst;
@ -484,7 +483,7 @@ tcds_intr(void *arg)
*/
#define PRINTINTR(msg, bits) \
if (ir & bits) \
printf("%s: %s", sc->sc_dv.dv_xname, msg);
printf("%s: %s", device_xname(&sc->sc_dv), msg);
PRINTINTR("SCSI0 DREQ interrupt.\n", TCDS_CIR_SCSI0_DREQ);
PRINTINTR("SCSI1 DREQ interrupt.\n", TCDS_CIR_SCSI1_DREQ);
PRINTINTR("SCSI0 prefetch interrupt.\n", TCDS_CIR_SCSI0_PREFETCH);
@ -542,13 +541,13 @@ tcds_params(struct tcds_softc *sc, int chip, int *idp, int *fastp)
if (id < 0 || id > 7) {
printf("%s: WARNING: bad SCSI ID %d for chip %d, using 7\n",
sc->sc_dv.dv_xname, id, chip);
device_xname(&sc->sc_dv), id, chip);
id = 7;
}
if (fast)
printf("%s: fast mode set for chip %d\n",
sc->sc_dv.dv_xname, chip);
device_xname(&sc->sc_dv), chip);
*idp = id;
*fastp = fast;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axe.c,v 1.23 2008/02/07 01:21:58 dyoung Exp $ */
/* $NetBSD: if_axe.c,v 1.24 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.23 2008/02/07 01:21:58 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.24 2008/04/05 16:35:35 cegger Exp $");
#if defined(__NetBSD__)
#include "opt_inet.h"
@ -413,7 +413,7 @@ USB_ATTACH(axe)
struct mii_data *mii;
u_char eaddr[ETHER_ADDR_LEN];
char *devinfop;
char *devname = USBDEVNAME(sc->axe_dev);
const char *devname = USBDEVNAME(sc->axe_dev);
struct ifnet *ifp;
int i, s;

View File

@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
/* $NetBSD: if_rum.c,v 1.19 2007/12/09 20:28:23 jmcneill Exp $ */
/* $NetBSD: if_rum.c,v 1.20 2008/04/05 16:35:35 cegger Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.19 2007/12/09 20:28:23 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.20 2008/04/05 16:35:35 cegger Exp $");
#include "bpfilter.h"
@ -2171,8 +2171,7 @@ rum_prepare_beacon(struct rum_softc *sc)
m0 = ieee80211_beacon_alloc(ic, ic->ic_bss, &sc->sc_bo);
if (m0 == NULL) {
printf("%s: could not allocate beacon frame\n",
sc->sc_dev.dv_xname);
aprint_error_dev(&sc->sc_dev, "could not allocate beacon frame\n");
return ENOBUFS;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_udav.c,v 1.22 2008/02/19 10:52:44 drochner Exp $ */
/* $NetBSD: if_udav.c,v 1.23 2008/04/05 16:35:35 cegger Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
* Copyright (c) 2003
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.22 2008/02/19 10:52:44 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.23 2008/04/05 16:35:35 cegger Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -182,7 +182,7 @@ USB_ATTACH(udav)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
struct ifnet *ifp;
struct mii_data *mii;
u_char eaddr[ETHER_ADDR_LEN];

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_url.c,v 1.30 2008/01/19 22:10:21 dyoung Exp $ */
/* $NetBSD: if_url.c,v 1.31 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2001, 2002
* Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.30 2008/01/19 22:10:21 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.31 2008/04/05 16:35:35 cegger Exp $");
#include "opt_inet.h"
#include "bpfilter.h"
@ -183,7 +183,7 @@ USB_ATTACH(url)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
struct ifnet *ifp;
struct mii_data *mii;
u_char eaddr[ETHER_ADDR_LEN];

View File

@ -1,4 +1,4 @@
/* $NetBSD: uchcom.c,v 1.2 2008/02/18 05:31:24 dyoung Exp $ */
/* $NetBSD: uchcom.c,v 1.3 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.2 2008/02/18 05:31:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.3 2008/04/05 16:35:35 cegger Exp $");
/*
* driver for WinChipHead CH341/340, the worst USB-serial chip in the world.
@ -246,7 +246,7 @@ USB_ATTACH(uchcom)
USB_ATTACH_START(uchcom, sc, uaa);
usbd_device_handle dev = uaa->device;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
struct uchcom_endpoints endpoints;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ucom.c,v 1.74 2007/12/30 21:49:47 smb Exp $ */
/* $NetBSD: ucom.c,v 1.75 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.74 2007/12/30 21:49:47 smb Exp $");
__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.75 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1084,7 +1084,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status)
DPRINTFN(7,("ucomreadcb: char=0x%02x\n", *cp));
if ((*rint)(*cp++, tp) == -1) {
/* XXX what should we do? */
printf("%s: lost %d chars\n", USBDEVNAME(sc->sc_dev),
aprint_error_dev(&sc->sc_dev, "lost %d chars\n",
cc);
break;
}
@ -1093,7 +1093,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status)
err = ucomstartread(sc);
if (err) {
printf("%s: read start failed\n", USBDEVNAME(sc->sc_dev));
aprint_error_dev(&sc->sc_dev, "read start failed\n");
/* XXX what should we dow now? */
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ucycom.c,v 1.20 2007/12/11 12:16:34 lukem Exp $ */
/* $NetBSD: ucycom.c,v 1.21 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.20 2007/12/11 12:16:34 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.21 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -907,7 +907,7 @@ ucycom_intr(struct uhidev *addr, void *ibuf, u_int len)
DPRINTFN(7,("ucycom_intr: char=0x%02x\n", *cp));
if ((*rint)(*cp++, tp) == -1) {
/* XXX what should we do? */
printf("%s: lost a character\n", USBDEVNAME(sc->sc_hdev.sc_dev));
aprint_error_dev(&sc->sc_hdev.sc_dev, "lost a character\n");
break;
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: uftdi.c,v 1.35 2008/02/18 05:31:24 dyoung Exp $ */
/* $NetBSD: uftdi.c,v 1.36 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.35 2008/02/18 05:31:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.36 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -184,7 +184,7 @@ USB_ATTACH(uftdi)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
int i,idx;
usbd_status err;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ugensa.c,v 1.17 2008/03/17 02:43:56 elric Exp $ */
/* $NetBSD: ugensa.c,v 1.18 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.17 2008/03/17 02:43:56 elric Exp $");
__KERNEL_RCSID(0, "$NetBSD: ugensa.c,v 1.18 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -162,7 +162,7 @@ USB_ATTACH(ugensa)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
usbd_status err;
struct ucom_attach_args uca;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipaq.c,v 1.9 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: uipaq.c,v 1.10 2008/04/05 16:35:35 cegger Exp $ */
/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
/*
@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.9 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.10 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -161,7 +161,7 @@ USB_ATTACH(uipaq)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
int i;
usbd_status err;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukbd.c,v 1.97 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: ukbd.c,v 1.98 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.97 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ukbd.c,v 1.98 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -320,8 +320,9 @@ ukbd_attach(device_t parent, device_t self, void *aux)
parseerr = ukbd_parse_desc(sc);
if (parseerr != NULL) {
printf("\n%s: attach failed, %s\n",
sc->sc_hdev.sc_dev.dv_xname, parseerr);
aprint_normal("\n");
aprint_error_dev(&sc->sc_hdev.sc_dev, "attach failed, %s\n",
parseerr);
USB_ATTACH_ERROR_RETURN;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: umct.c,v 1.23 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: umct.c,v 1.24 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.23 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.24 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -180,7 +180,7 @@ USB_ATTACH(umct)
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
usbd_status err;
int i;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: umidi.c,v 1.34 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: umidi.c,v 1.35 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.34 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.35 2008/04/05 16:35:35 cegger Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -1291,7 +1291,7 @@ describe_mididev(struct umidi_mididev *md)
{
char in_label[16];
char out_label[16];
char *unit_label;
const char *unit_label;
char *final_label;
struct umidi_softc *sc;
int show_ep_in;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uplcom.c,v 1.62 2008/02/21 04:38:43 rafal Exp $ */
/* $NetBSD: uplcom.c,v 1.63 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.62 2008/02/21 04:38:43 rafal Exp $");
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.63 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -257,7 +257,7 @@ USB_ATTACH(uplcom)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
usbd_status err;
int i;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_mem.c,v 1.33 2007/10/19 12:01:22 ad Exp $ */
/* $NetBSD: usb_mem.c,v 1.34 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.33 2007/10/19 12:01:22 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: usb_mem.c,v 1.34 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -314,8 +314,8 @@ usb_reserve_allocm(struct usb_dma_reserve *rs, usb_dma_t *dma, u_int32_t size)
EX_NOWAIT, &start);
if (error != 0) {
printf("%s: usb_reserve_allocm of size %u failed (error %d)\n",
((struct device *)rs->softc)->dv_xname, size, error);
aprint_error_dev((struct device *)rs->softc, "usb_reserve_allocm of size %u failed (error %d)\n",
size, error);
return USBD_NOMEM;
}
@ -377,7 +377,7 @@ usb_setup_reserve(void *softc, struct usb_dma_reserve *rs, bus_dma_tag_t dtag,
goto destroy;
rs->paddr = rs->map->dm_segs[0].ds_addr;
rs->extent = extent_create(dv->dv_xname, (u_long)rs->paddr,
rs->extent = extent_create(device_xname(dv), (u_long)rs->paddr,
(u_long)(rs->paddr + USB_MEM_RESERVE),
M_USB, 0, 0, 0);
if (rs->extent == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_port.h,v 1.80 2008/03/28 17:10:30 drochner Exp $ */
/* $NetBSD: usb_port.h,v 1.81 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -102,9 +102,9 @@ typedef struct proc *usb_proc_ptr;
typedef struct device *device_ptr_t;
#define USBBASEDEVICE struct device
#define USBDEV(bdev) (&(bdev))
#define USBDEVNAME(bdev) ((bdev).dv_xname)
#define USBDEVNAME(bdev) (device_xname(&(bdev)))
#define USBDEVUNIT(bdev) device_unit(&(bdev))
#define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
#define USBDEVPTRNAME(bdevptr) (device_xname(bdevptr))
#define USBGETSOFTC(d) ((void *)(d))
#define DECLARE_USB_DMA_T \

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_subr.c,v 1.151 2008/03/28 17:14:46 drochner Exp $ */
/* $NetBSD: usb_subr.c,v 1.152 2008/04/05 16:35:35 cegger Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.151 2008/03/28 17:14:46 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.152 2008/04/05 16:35:35 cegger Exp $");
#include "opt_compat_netbsd.h"
#include "opt_usbverbose.h"
@ -1488,7 +1488,7 @@ void
usb_disconnect_port(struct usbd_port *up, device_ptr_t parent)
{
usbd_device_handle dev = up->device;
char *hubname = USBDEVPTRNAME(parent);
const char *hubname = USBDEVPTRNAME(parent);
int i;
DPRINTFN(3,("uhub_disconnect: up=%p dev=%p port=%d\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: uslsa.c,v 1.5 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: uslsa.c,v 1.6 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.5 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uslsa.c,v 1.6 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -214,7 +214,7 @@ USB_ATTACH(uslsa)
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname;
const char *devname;
usbd_status err;
struct ucom_attach_args uca;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ustir.c,v 1.23 2008/03/01 14:16:51 rmind Exp $ */
/* $NetBSD: ustir.c,v 1.24 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.23 2008/03/01 14:16:51 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.24 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -946,7 +946,7 @@ ustir_open(void *h, int flag, int mode,
sc->sc_refcnt++;
error = kthread_create(PRI_NONE, 0, NULL, ustir_thread, sc,
&sc->sc_thread, "%s", sc->sc_dev.dv_xname);
&sc->sc_thread, "%s", device_xname(&sc->sc_dev));
if (error) {
sc->sc_refcnt--;
goto bad5;

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvisor.c,v 1.37 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: uvisor.c,v 1.38 2008/04/05 16:35:35 cegger Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.37 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.38 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -226,7 +226,7 @@ USB_ATTACH(uvisor)
struct uvisor_palm_connection_info palmconinfo;
usb_endpoint_descriptor_t *ed;
char *devinfop;
char *devname = USBDEVNAME(sc->sc_dev);
const char *devname = USBDEVNAME(sc->sc_dev);
int i, j, hasin, hasout, port;
usbd_status err;
struct ucom_attach_args uca;

View File

@ -1,4 +1,4 @@
/* $NetBSD: xboxcontroller.c,v 1.7 2008/02/18 05:24:24 dyoung Exp $ */
/* $NetBSD: xboxcontroller.c,v 1.8 2008/04/05 16:35:35 cegger Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xboxcontroller.c,v 1.7 2008/02/18 05:24:24 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: xboxcontroller.c,v 1.8 2008/04/05 16:35:35 cegger Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -145,7 +145,7 @@ USB_ATTACH(xboxcontroller)
ed = usbd_interface2endpoint_descriptor(sc->sc_iface, 0);
if (ed == NULL) {
aprint_error("%s: couldn't get ep 0\n", USBDEVNAME(sc->sc_dev));
aprint_error_dev(&sc->sc_dev, "couldn't get ep 0\n");
sc->sc_dying = 1;
USB_ATTACH_ERROR_RETURN;
}