Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi PR# kern/41179: Incorrect return values from Ac...
details: https://anonhg.NetBSD.org/src/rev/c6ef8d355ec2
branches: trunk
changeset: 746970:c6ef8d355ec2
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Aug 25 10:34:08 2009 +0000
description:
PR# kern/41179: Incorrect return values from AcpiOsExecute()
ACPICA functions return ACPI_STATUS instead of int, so use it for
consistency.
diffstat:
sys/dev/acpi/acpi.c | 6 +++---
sys/dev/acpi/acpi_acad.c | 6 +++---
sys/dev/acpi/acpi_bat.c | 6 +++---
sys/dev/acpi/acpi_button.c | 6 +++---
sys/dev/acpi/acpi_lid.c | 6 +++---
sys/dev/acpi/acpi_tz.c | 8 ++++----
6 files changed, 19 insertions(+), 19 deletions(-)
diffs (171 lines):
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $ */
+/* $NetBSD: acpi.c,v 1.131 2009/08/25 10:34:08 jmcneill Exp $ */
/*-
* Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.130 2009/08/23 15:16:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.131 2009/08/25 10:34:08 jmcneill Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -1104,7 +1104,7 @@
acpi_fixed_button_handler(void *context)
{
struct sysmon_pswitch *smpsw = context;
- int rv;
+ ACPI_STATUS rv;
#ifdef ACPI_BUT_DEBUG
printf("%s: fixed button handler\n", smpsw->smpsw_name);
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi_acad.c
--- a/sys/dev/acpi/acpi_acad.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi_acad.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_acad.c,v 1.34 2009/05/12 09:29:46 cegger Exp $ */
+/* $NetBSD: acpi_acad.c,v 1.35 2009/08/25 10:34:08 jmcneill Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.34 2009/05/12 09:29:46 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.35 2009/08/25 10:34:08 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -239,7 +239,7 @@
{
device_t dv = context;
struct acpiacad_softc *sc = device_private(dv);
- int rv;
+ ACPI_STATUS rv;
switch (notify) {
/*
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi_bat.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.71 2009/05/12 09:50:28 cegger Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.72 2009/08/25 10:34:08 jmcneill Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.71 2009/05/12 09:50:28 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.72 2009/08/25 10:34:08 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -667,7 +667,7 @@
acpibat_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
{
device_t dv = context;
- int rv;
+ ACPI_STATUS rv;
#ifdef ACPI_BAT_DEBUG
aprint_debug_dev(dv, "received notify message: 0x%x\n", notify);
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi_button.c
--- a/sys/dev/acpi/acpi_button.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi_button.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_button.c,v 1.27 2009/08/04 14:20:40 jmcneill Exp $ */
+/* $NetBSD: acpi_button.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $ */
/*
* Copyright 2001, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.27 2009/08/04 14:20:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -180,7 +180,7 @@
acpibut_notify_handler(ACPI_HANDLE handle, UINT32 notify, void *context)
{
device_t dv = context;
- int rv;
+ ACPI_STATUS rv;
switch (notify) {
case ACPI_NOTIFY_S0PowerButtonPressed:
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi_lid.c
--- a/sys/dev/acpi/acpi_lid.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi_lid.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_lid.c,v 1.27 2009/08/04 14:20:40 jmcneill Exp $ */
+/* $NetBSD: acpi_lid.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $ */
/*
* Copyright 2001, 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.27 2009/08/04 14:20:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.28 2009/08/25 10:34:08 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -202,7 +202,7 @@
{
device_t dv = context;
struct acpilid_softc *sc = device_private(dv);
- int rv;
+ ACPI_STATUS rv;
switch (notify) {
case ACPI_NOTIFY_LidStatusChanged:
diff -r fe24b2748295 -r c6ef8d355ec2 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Tue Aug 25 09:27:25 2009 +0000
+++ b/sys/dev/acpi/acpi_tz.c Tue Aug 25 10:34:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.45 2009/07/04 13:36:49 pgoyette Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.46 2009/08/25 10:34:08 jmcneill Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.45 2009/07/04 13:36:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.46 2009/08/25 10:34:08 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -517,7 +517,7 @@
device_t dv = opaque;
ACPI_OSD_EXEC_CALLBACK func = NULL;
const char *name;
- int rv;
+ ACPI_STATUS rv;
switch (notify) {
case ACPI_NOTIFY_ThermalZoneStatusChanged:
@@ -538,7 +538,7 @@
KASSERT(func != NULL);
rv = AcpiOsExecute(OSL_NOTIFY_HANDLER, func, dv);
- if (rv != AE_OK)
+ if (ACPI_FAILURE(rv))
aprint_debug_dev(dv, "unable to queue %s\n", name);
}
Home |
Main Index |
Thread Index |
Old Index