use aprint_*_dev and device_xname
This commit is contained in:
parent
bebbf57b68
commit
335ec2beb5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: acpi_resource.c,v 1.24 2007/12/15 00:39:25 perry Exp $ */
|
||||
/* $NetBSD: acpi_resource.c,v 1.25 2008/04/05 21:44:50 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.24 2007/12/15 00:39:25 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.25 2008/04/05 21:44:50 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -381,7 +381,7 @@ acpi_resource_print(struct device *dev, struct acpi_resources *res)
|
||||
SIMPLEQ_EMPTY(&res->ar_drq))
|
||||
return;
|
||||
|
||||
aprint_normal("%s:", dev->dv_xname);
|
||||
aprint_normal_dev(dev, "");
|
||||
|
||||
if (SIMPLEQ_EMPTY(&res->ar_io) == 0) {
|
||||
struct acpi_io *ar;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atppc_acpi.c,v 1.10 2007/10/19 11:59:35 ad Exp $ */
|
||||
/* $NetBSD: atppc_acpi.c,v 1.11 2008/04/05 21:44:50 cegger Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.10 2007/10/19 11:59:35 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.11 2008/04/05 21:44:50 cegger Exp $");
|
||||
|
||||
#include "opt_atppc.h"
|
||||
|
||||
@ -133,16 +133,14 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* find our i/o registers */
|
||||
io = acpi_res_io(&res, 0);
|
||||
if (io == NULL) {
|
||||
aprint_error("%s: unable to find i/o register resource\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_dev, "unable to find i/o register resource\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* find our IRQ */
|
||||
irq = acpi_res_irq(&res, 0);
|
||||
if (irq == NULL) {
|
||||
aprint_error("%s: unable to find irq resource\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_dev, "unable to find irq resource\n");
|
||||
goto out;
|
||||
}
|
||||
nirq = irq->ar_irq;
|
||||
@ -150,8 +148,7 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* find our DRQ */
|
||||
drq = acpi_res_drq(&res, 0);
|
||||
if (drq == NULL) {
|
||||
aprint_error("%s: unable to find drq resource\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_dev, "unable to find drq resource\n");
|
||||
goto out;
|
||||
}
|
||||
asc->sc_drq = drq->ar_drq;
|
||||
@ -165,8 +162,8 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length, 0,
|
||||
&sc->sc_ioh) != 0) {
|
||||
aprint_error("%s: attempt to map bus space failed, device not "
|
||||
"properly attached.\n", self->dv_xname);
|
||||
aprint_error_dev(self, "attempt to map bus space failed, device not "
|
||||
"properly attached.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wss_acpi.c,v 1.18 2007/10/19 11:59:36 ad Exp $ */
|
||||
/* $NetBSD: wss_acpi.c,v 1.19 2008/04/05 21:44:50 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.18 2007/10/19 11:59:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.19 2008/04/05 21:44:50 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -143,20 +143,17 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
dspio = acpi_res_io(&res, wah->io_region_idx_ad1848);
|
||||
oplio = acpi_res_io(&res, wah->io_region_idx_opl);
|
||||
if (dspio == NULL || oplio == NULL) {
|
||||
aprint_error("%s: unable to find i/o registers resource\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "unable to find i/o registers resource\n");
|
||||
goto out;
|
||||
}
|
||||
if (bus_space_map(sc->sc_iot, dspio->ar_base, dspio->ar_length,
|
||||
0, &sc->sc_ioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "unable to map i/o registers\n");
|
||||
goto out;
|
||||
}
|
||||
if (bus_space_map(sc->sc_iot, oplio->ar_base, oplio->ar_length,
|
||||
0, &sc->sc_opl_ioh) != 0) {
|
||||
aprint_error("%s: unable to map opl i/o registers\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "unable to map opl i/o registers\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -165,8 +162,7 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* Find our IRQ */
|
||||
irq = acpi_res_irq(&res, 0);
|
||||
if (irq == NULL) {
|
||||
aprint_error("%s: unable to find irq resource\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "unable to find irq resource\n");
|
||||
/* XXX bus_space_unmap */
|
||||
goto out;
|
||||
}
|
||||
@ -176,8 +172,7 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
playdrq = acpi_res_drq(&res, 0);
|
||||
recdrq = acpi_res_drq(&res, 1);
|
||||
if (playdrq == NULL || recdrq == NULL) {
|
||||
aprint_error("%s: unable to find drq resources\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, " unable to find drq resources\n");
|
||||
/* XXX bus_space_unmap */
|
||||
goto out;
|
||||
}
|
||||
@ -190,13 +185,12 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
/* Look for the ad1848 */
|
||||
if (!ad1848_isa_probe(&sc->sc_ad1848)) {
|
||||
aprint_error("%s: ad1848 probe failed\n",
|
||||
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_error_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "ad1848 probe failed\n");
|
||||
/* XXX cleanup */
|
||||
goto out;
|
||||
}
|
||||
|
||||
aprint_normal("%s", sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
|
||||
aprint_normal_dev(&sc->sc_ad1848.sc_ad1848.sc_dev, "");
|
||||
/* Attach our wss device */
|
||||
wssattach(sc);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ym_acpi.c,v 1.4 2007/10/19 11:59:36 ad Exp $ */
|
||||
/* $NetBSD: ym_acpi.c,v 1.5 2008/04/05 21:44:50 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Jasper Wallace <jasper@pointless.net>
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ym_acpi.c,v 1.4 2007/10/19 11:59:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ym_acpi.c,v 1.5 2008/04/05 21:44:50 cegger Exp $");
|
||||
|
||||
#include "mpu_ym.h"
|
||||
|
||||
@ -123,40 +123,34 @@ ym_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
mpu_io == NULL ||
|
||||
#endif
|
||||
control_io == NULL) {
|
||||
aprint_error("%s: unable to find i/o registers resource\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to find i/o registers resource\n");
|
||||
goto out;
|
||||
}
|
||||
if (bus_space_map(sc->sc_iot, sb_io->ar_base, sb_io->ar_length,
|
||||
0, &sc->sc_sb_ioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers (sb)\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to map i/o registers (sb)\n");
|
||||
goto out;
|
||||
}
|
||||
if (bus_space_map(sc->sc_iot, codec_io->ar_base, codec_io->ar_length,
|
||||
0, &sc->sc_ioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers (codec)\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to map i/o registers (codec)\n");
|
||||
goto out;
|
||||
}
|
||||
if (bus_space_map(sc->sc_iot, opl_io->ar_base, opl_io->ar_length,
|
||||
0, &sc->sc_opl_ioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers (opl)\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to map i/o registers (opl)\n");
|
||||
goto out;
|
||||
}
|
||||
#if NMPU_YM > 0
|
||||
if (bus_space_map(sc->sc_iot, mpu_io->ar_base, mpu_io->ar_length,
|
||||
0, &sc->sc_mpu_ioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers (mpu)\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to map i/o registers (mpu)\n");
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
if (bus_space_map(sc->sc_iot, control_io->ar_base,
|
||||
control_io->ar_length, 0, &sc->sc_controlioh) != 0) {
|
||||
aprint_error("%s: unable to map i/o registers (control)\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to map i/o registers (control)\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -165,8 +159,7 @@ ym_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
/* Find our IRQ */
|
||||
irq = acpi_res_irq(&res, 0);
|
||||
if (irq == NULL) {
|
||||
aprint_error("%s: unable to find irq resource\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to find irq resource\n");
|
||||
/* XXX bus_space_unmap */
|
||||
goto out;
|
||||
}
|
||||
@ -176,8 +169,7 @@ ym_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
playdrq = acpi_res_drq(&res, 0);
|
||||
recdrq = acpi_res_drq(&res, 1);
|
||||
if (playdrq == NULL) {
|
||||
aprint_error("%s: unable to find drq resources\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "unable to find drq resources\n");
|
||||
/* XXX bus_space_unmap */
|
||||
goto out;
|
||||
}
|
||||
@ -192,13 +184,12 @@ ym_acpi_attach(struct device *parent, struct device *self, void *aux)
|
||||
ac->sc_iot = sc->sc_iot;
|
||||
if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, WSS_CODEC,
|
||||
AD1848_NPORT, &ac->sc_ioh)) {
|
||||
aprint_error("%s: bus_space_subregion failed\n",
|
||||
self->dv_xname);
|
||||
aprint_error_dev(self, "bus_space_subregion failed\n");
|
||||
/* XXX cleanup */
|
||||
goto out;
|
||||
}
|
||||
|
||||
aprint_normal("%s", self->dv_xname);
|
||||
aprint_normal_dev(self, "");
|
||||
|
||||
ac->mode = 2;
|
||||
ac->MCE_bit = MODE_CHANGE_ENABLE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user