summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjruoho <jruoho@NetBSD.org>2010-03-16 08:02:01 +0000
committerjruoho <jruoho@NetBSD.org>2010-03-16 08:02:01 +0000
commitb32f00af46d5fc73f7099d48c472a986b93e7ede (patch)
tree703378c8d0a4c4e41191b1d963f5214c2cd08c1a /sys/dev
parentdd980e2a522aa57a3273c62ebcd31320e4abbf63 (diff)
Remove the call to AcpiGetType() in acpi_make_devnode(). This is the same
information as ACPI_DEVICE_INFO::Type, obtained later by AcpiGetObjectInfo().
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index 5b04ac79d31..ce8438edd7f 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.160 2010/03/16 05:48:42 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.161 2010/03/16 08:02:01 jruoho 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.160 2010/03/16 05:48:42 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.161 2010/03/16 08:02:01 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -874,18 +874,12 @@ acpi_make_devnode(ACPI_HANDLE handle, uint32_t level,
ACPI_STATUS rv;
int clear, i;
- rv = AcpiGetType(handle, &type);
+ rv = AcpiGetObjectInfo(handle, &devinfo);
if (ACPI_FAILURE(rv))
return AE_OK; /* Do not terminate the walk. */
- rv = AcpiGetObjectInfo(handle, &devinfo);
-
- if (ACPI_FAILURE(rv)) {
- aprint_debug_dev(sc->sc_dev, "failed to get object "
- "information: %s\n", AcpiFormatException(rv));
- return AE_OK;
- }
+ type = devinfo->Type;
switch (type) {