Clean up some messages:

* Use AcpiFormatException() in a bunch of places.
* acpi_resource_parse() already prints an error, so don't do it in the callers.
This commit is contained in:
mycroft 2003-11-03 17:24:22 +00:00
parent 72ae89b69a
commit 01558f7ee2
12 changed files with 83 additions and 88 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi.c,v 1.54 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: acpi.c,v 1.55 2003/11/03 17:24:22 mycroft Exp $ */
/*- /*-
* Copyright (c) 2003 The NetBSD Foundation, Inc. * Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -77,7 +77,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.54 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.55 2003/11/03 17:24:22 mycroft Exp $");
#include "opt_acpi.h" #include "opt_acpi.h"
@ -192,7 +192,8 @@ acpi_probe(void)
rv = AcpiInitializeSubsystem(); rv = AcpiInitializeSubsystem();
if (rv != AE_OK) { if (rv != AE_OK) {
printf("ACPI: unable to initialize ACPICA: %d\n", rv); printf("ACPI: unable to initialize ACPICA: %s\n",
AcpiFormatException(rv));
return (0); return (0);
} }
@ -203,7 +204,8 @@ acpi_probe(void)
rv = AcpiLoadTables(); rv = AcpiLoadTables();
if (rv != AE_OK) { if (rv != AE_OK) {
printf("ACPI: unable to load tables: %d\n", rv); printf("ACPI: unable to load tables: %s\n",
AcpiFormatException(rv));
return (0); return (0);
} }
@ -287,14 +289,14 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiEnableSubsystem(0); rv = AcpiEnableSubsystem(0);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to enable ACPI: %d\n", printf("%s: unable to enable ACPI: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
rv = AcpiInitializeObjects(0); rv = AcpiInitializeObjects(0);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to initialize ACPI objects: %d\n", printf("%s: unable to initialize ACPI objects: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
acpi_active = 1; acpi_active = 1;
@ -533,8 +535,8 @@ acpi_make_devnode(ACPI_HANDLE handle, UINT32 level, void *context,
rv = AcpiGetObjectInfo(handle, &buf); rv = AcpiGetObjectInfo(handle, &buf);
if (rv != AE_OK) { if (rv != AE_OK) {
#ifdef ACPI_DEBUG #ifdef ACPI_DEBUG
printf("%s: AcpiGetObjectInfo failed\n", printf("%s: AcpiGetObjectInfo failed: %s\n",
sc->sc_dev.dv_xname); sc->sc_dev.dv_xname, AcpiFormatException(rv));
#endif #endif
goto out; /* XXX why return OK */ goto out; /* XXX why return OK */
} }
@ -739,7 +741,8 @@ acpi_fixed_button_handler(void *context)
acpi_fixed_button_pressed, smpsw); acpi_fixed_button_pressed, smpsw);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: WARNING: unable to queue fixed button pressed " printf("%s: WARNING: unable to queue fixed button pressed "
"callback: %d\n", smpsw->smpsw_name, rv); "callback: %s\n", smpsw->smpsw_name,
AcpiFormatException(rv));
return (ACPI_INTERRUPT_HANDLED); return (ACPI_INTERRUPT_HANDLED);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_acad.c,v 1.10 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: acpi_acad.c,v 1.11 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright 2001 Wasabi Systems, Inc. * Copyright 2001 Wasabi Systems, Inc.
@ -44,7 +44,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.10 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.11 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -166,8 +166,8 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle, rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpiacad_notify_handler, sc); ACPI_DEVICE_NOTIFY, acpiacad_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register DEVICE NOTIFY handler: %d\n", printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -175,8 +175,8 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle, rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_SYSTEM_NOTIFY, acpiacad_notify_handler, sc); ACPI_SYSTEM_NOTIFY, acpiacad_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register SYSTEM NOTIFY handler: %d\n", printf("%s: unable to register SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -257,8 +257,8 @@ acpiacad_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO, rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO,
acpiacad_get_status, sc); acpiacad_get_status, sc);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: unable to queue status check: %d\n", printf("%s: unable to queue status check: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
break; break;
default: default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_bat.c,v 1.33 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: acpi_bat.c,v 1.34 2003/11/03 17:24:22 mycroft Exp $ */
/*- /*-
* Copyright (c) 2003 The NetBSD Foundation, Inc. * Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -86,7 +86,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.33 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.34 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -271,8 +271,8 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
ACPI_DEVICE_NOTIFY, ACPI_DEVICE_NOTIFY,
acpibat_notify_handler, sc); acpibat_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register DEVICE NOTIFY handler: %d\n", printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -281,8 +281,8 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
ACPI_SYSTEM_NOTIFY, ACPI_SYSTEM_NOTIFY,
acpibat_notify_handler, sc); acpibat_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register SYSTEM NOTIFY handler: %d\n", printf("%s: unable to register SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -356,8 +356,8 @@ acpibat_battery_present(struct acpibat_softc *sc)
rv = acpi_eval_integer(sc->sc_node->ad_handle, "_STA", &val); rv = acpi_eval_integer(sc->sc_node->ad_handle, "_STA", &val);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: failed to evaluate _STA: %x\n", printf("%s: failed to evaluate _STA: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return (-1); return (-1);
} }
@ -392,8 +392,8 @@ acpibat_get_info(struct acpibat_softc *sc)
rv = acpi_eval_struct(sc->sc_node->ad_handle, "_BIF", &buf); rv = acpi_eval_struct(sc->sc_node->ad_handle, "_BIF", &buf);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: failed to evaluate _BIF: 0x%x\n", printf("%s: failed to evaluate _BIF: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return (rv); return (rv);
} }
p1 = (ACPI_OBJECT *)buf.Pointer; p1 = (ACPI_OBJECT *)buf.Pointer;
@ -482,7 +482,8 @@ acpibat_get_status(struct acpibat_softc *sc)
rv = acpi_eval_struct(sc->sc_node->ad_handle, "_BST", &buf); rv = acpi_eval_struct(sc->sc_node->ad_handle, "_BST", &buf);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("bat: failed to evaluate _BST: 0x%x\n", rv); printf("%s: failed to evaluate _BST: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return (rv); return (rv);
} }
p1 = (ACPI_OBJECT *)buf.Pointer; p1 = (ACPI_OBJECT *)buf.Pointer;
@ -552,7 +553,7 @@ acpibat_print_info(struct acpibat_softc *sc)
else else
tech = "primary"; tech = "primary";
printf("%s: %s battery, Design %d.%03d%s, Predicted %d.%03d%s" printf("%s: %s battery, Design %d.%03d%s, Last full %d.%03d%s"
"Warn %d.%03d%s Low %d.%03d%s\n", "Warn %d.%03d%s Low %d.%03d%s\n",
sc->sc_dev.dv_xname, tech, sc->sc_dev.dv_xname, tech,
SCALE(sc->sc_data[ACPIBAT_DCAPACITY].cur.data_s), CAPUNITS(sc), SCALE(sc->sc_data[ACPIBAT_DCAPACITY].cur.data_s), CAPUNITS(sc),
@ -677,8 +678,8 @@ acpibat_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO, rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO,
acpibat_update, sc); acpibat_update, sc);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: unable to queue status check: %d\n", printf("%s: unable to queue status check: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
break; break;
case ACPI_NOTIFY_BatteryStatusChanged: case ACPI_NOTIFY_BatteryStatusChanged:
@ -688,8 +689,8 @@ acpibat_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO, rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO,
acpibat_update, sc); acpibat_update, sc);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: unable to queue status check: %d\n", printf("%s: unable to queue status check: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
break; break;
default: default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_button.c,v 1.11 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: acpi_button.c,v 1.12 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright 2001, 2003 Wasabi Systems, Inc. * Copyright 2001, 2003 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.11 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.12 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -131,8 +131,8 @@ acpibut_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle, rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpibut_notify_handler, sc); ACPI_DEVICE_NOTIFY, acpibut_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register device notify handler: %d\n", printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -182,7 +182,8 @@ acpibut_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
acpibut_pressed_event, sc); acpibut_pressed_event, sc);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: WARNING: unable to queue button pressed " printf("%s: WARNING: unable to queue button pressed "
"callback: %d\n", sc->sc_dev.dv_xname, rv); "callback: %s\n", sc->sc_dev.dv_xname,
AcpiFormatException(rv));
break; break;
/* XXX ACPI_NOTIFY_DeviceWake?? */ /* XXX ACPI_NOTIFY_DeviceWake?? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_lid.c,v 1.10 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: acpi_lid.c,v 1.11 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright 2001, 2003 Wasabi Systems, Inc. * Copyright 2001, 2003 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.10 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.11 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -115,8 +115,8 @@ acpilid_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle, rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpilid_notify_handler, sc); ACPI_DEVICE_NOTIFY, acpilid_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to register device notify handler: %d\n", printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
} }
@ -161,7 +161,8 @@ acpilid_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
acpilid_status_changed, sc); acpilid_status_changed, sc);
if (rv != AE_OK) if (rv != AE_OK)
printf("%s: WARNING: unable to queue lid change " printf("%s: WARNING: unable to queue lid change "
"event: %d\n", sc->sc_dev.dv_xname, rv); "callback: %s\n", sc->sc_dev.dv_xname,
AcpiFormatException(rv));
break; break;
default: default:

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_resource.c,v 1.7 2003/11/02 11:12:53 jdolecek Exp $ */ /* $NetBSD: acpi_resource.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright 2001 Wasabi Systems, Inc. * Copyright 2001 Wasabi Systems, Inc.
@ -67,7 +67,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.7 2003/11/02 11:12:53 jdolecek Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_resource.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -110,8 +110,8 @@ acpi_resource_parse(struct device *dev, struct acpi_devnode *ad,
status = acpi_get(ad->ad_handle, &buf, AcpiGetCurrentResources); status = acpi_get(ad->ad_handle, &buf, AcpiGetCurrentResources);
if (status != AE_OK) { if (status != AE_OK) {
printf("%s: ACPI: unable to get Current Resources: %d\n", printf("%s: ACPI: unable to get Current Resources: %s\n",
dev->dv_xname, status); dev->dv_xname, AcpiFormatException(status));
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_tz.c,v 1.4 2003/10/31 21:52:11 mycroft Exp $ */ /* $NetBSD: acpi_tz.c,v 1.5 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright (c) 2003 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2003 Jared D. McNeill <jmcneill@invisible.ca>
@ -30,7 +30,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.4 2003/10/31 21:52:11 mycroft Exp $"); __KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.5 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -171,8 +171,8 @@ acpitz_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_devnode->ad_handle, rv = AcpiInstallNotifyHandler(sc->sc_devnode->ad_handle,
ACPI_SYSTEM_NOTIFY, acpitz_notify_handler, sc); ACPI_SYSTEM_NOTIFY, acpitz_notify_handler, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to install system notify handler\n", printf("%s: unable to install SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -192,8 +192,8 @@ acpitz_get_status(void *opaque)
rv = acpi_eval_integer(sc->sc_devnode->ad_handle, "_TMP", rv = acpi_eval_integer(sc->sc_devnode->ad_handle, "_TMP",
&sc->sc_zone.tmp); &sc->sc_zone.tmp);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: failed to evaluate _TMP: 0x%x\n", printf("%s: failed to evaluate _TMP: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, AcpiFormatException(rv));
return; return;
} }
@ -228,12 +228,12 @@ acpitz_notify_handler(ACPI_HANDLE hdl, UINT32 notify, void *opaque)
rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO, rv = AcpiOsQueueForExecution(OSD_PRIORITY_LO,
acpitz_get_status, sc); acpitz_get_status, sc);
if (rv != AE_OK) { if (rv != AE_OK) {
printf("%s: unable to queue status check\n", printf("%s: unable to queue status check: %s\n",
sc->sc_dev.dv_xname); sc->sc_dev.dv_xname, AcpiFormatException(rv));
} }
break; break;
default: default:
printf("%s: received unhandled notify message %d\n", printf("%s: received unhandled notify message 0x%x\n",
sc->sc_dev.dv_xname, notify); sc->sc_dev.dv_xname, notify);
break; break;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: com_acpi.c,v 1.9 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: com_acpi.c,v 1.10 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.9 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.10 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -105,10 +105,8 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux)
/* parse resources */ /* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &res, rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &res,
&acpi_resource_parse_ops_default); &acpi_resource_parse_ops_default);
if (rv != AE_OK) { if (rv != AE_OK)
printf("%s: unable to parse resources\n", sc->sc_dev.dv_xname);
return; return;
}
/* find our i/o registers */ /* find our i/o registers */
io = acpi_res_io(&res, 0); io = acpi_res_io(&res, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fdc_acpi.c,v 1.15 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: fdc_acpi.c,v 1.16 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.15 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.16 2003/11/03 17:24:22 mycroft Exp $");
#include "rnd.h" #include "rnd.h"
@ -128,10 +128,8 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* parse resources */ /* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &asc->res, rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &asc->res,
&acpi_resource_parse_ops_default); &acpi_resource_parse_ops_default);
if (rv != AE_OK) { if (rv != AE_OK)
printf("%s: unable to parse resources\n", sc->sc_dev.dv_xname);
return; return;
}
/* find our i/o registers */ /* find our i/o registers */
io = acpi_res_io(&asc->res, 0); io = acpi_res_io(&asc->res, 0);
@ -242,8 +240,8 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc)
rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDE", &buf); rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDE", &buf);
if (rv != AE_OK) { if (rv != AE_OK) {
#ifdef ACPI_FDC_DEBUG #ifdef ACPI_FDC_DEBUG
printf("%s: failed to evaluate _FDE: %x\n", printf("%s: failed to evaluate _FDE: %s\n",
sc->sc_dev.dv_xname, rv); sc->sc_dev.dv_xname, rv, AcpiFormatException(rv));
#endif #endif
return drives; return drives;
} }
@ -305,8 +303,8 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc)
rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDI", &buf); rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDI", &buf);
if (rv != AE_OK) { if (rv != AE_OK) {
#ifdef ACPI_FDC_DEBUG #ifdef ACPI_FDC_DEBUG
printf("%s: failed to evaluate _FDI: %x on drive %d\n", printf("%s: failed to evaluate _FDI: %s on drive %d\n",
sc->sc_dev.dv_xname, rv, i); sc->sc_dev.dv_xname, AcpiFormatException(rv), i);
#endif #endif
/* XXX if _FDI fails, assume 1.44MB floppy */ /* XXX if _FDI fails, assume 1.44MB floppy */
sc->sc_knownfds[i] = &fdc_acpi_fdtypes[0]; sc->sc_knownfds[i] = &fdc_acpi_fdtypes[0];

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_acpi.c,v 1.4 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: lpt_acpi.c,v 1.5 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lpt_acpi.c,v 1.4 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: lpt_acpi.c,v 1.5 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -101,10 +101,8 @@ lpt_acpi_attach(struct device *parent, struct device *self, void *aux)
/* parse resources */ /* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &res, rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node, &res,
&acpi_resource_parse_ops_default); &acpi_resource_parse_ops_default);
if (rv != AE_OK) { if (rv != AE_OK)
printf("%s: unable to parse resources\n", sc->sc_dev.dv_xname);
return; return;
}
/* find our i/o registers */ /* find our i/o registers */
io = acpi_res_io(&res, 0); io = acpi_res_io(&res, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_acpi.c,v 1.7 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: pckbc_acpi.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $ */
/*- /*-
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -49,7 +49,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.7 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -156,10 +156,8 @@ pckbc_acpi_attach(struct device *parent,
/* parse resources */ /* parse resources */
rv = acpi_resource_parse(&sc->sc_dv, aa->aa_node, &res, rv = acpi_resource_parse(&sc->sc_dv, aa->aa_node, &res,
&acpi_resource_parse_ops_default); &acpi_resource_parse_ops_default);
if (rv != AE_OK) { if (rv != AE_OK)
printf("%s: unable to parse resources\n", sc->sc_dv.dv_xname);
return; return;
}
/* find our IRQ */ /* find our IRQ */
irq = acpi_res_irq(&res, 0); irq = acpi_res_irq(&res, 0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: wss_acpi.c,v 1.7 2003/11/03 06:03:47 kochi Exp $ */ /* $NetBSD: wss_acpi.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $ */
/* /*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.7 2003/11/03 06:03:47 kochi Exp $"); __KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.8 2003/11/03 17:24:22 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -132,11 +132,8 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
/* Parse our resources */ /* Parse our resources */
rv = acpi_resource_parse(&sc->sc_ad1848.sc_ad1848.sc_dev, rv = acpi_resource_parse(&sc->sc_ad1848.sc_ad1848.sc_dev,
aa->aa_node, &res, &acpi_resource_parse_ops_default); aa->aa_node, &res, &acpi_resource_parse_ops_default);
if (rv != AE_OK) { if (rv != AE_OK)
printf("%s: unable to parse resources\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
return; return;
}
/* Find and map our i/o registers */ /* Find and map our i/o registers */
sc->sc_iot = aa->aa_iot; sc->sc_iot = aa->aa_iot;