Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Remove the call to AcpiGetType() in acpi_make_d...



details:   https://anonhg.NetBSD.org/src/rev/c05265364ae2
branches:  trunk
changeset: 753119:c05265364ae2
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Mar 16 08:02:01 2010 +0000

description:
Remove the call to AcpiGetType() in acpi_make_devnode(). This is the same
information as ACPI_DEVICE_INFO::Type, obtained later by AcpiGetObjectInfo().

diffstat:

 sys/dev/acpi/acpi.c |  14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (39 lines):

diff -r 07a557790591 -r c05265364ae2 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c       Tue Mar 16 07:18:55 2010 +0000
+++ b/sys/dev/acpi/acpi.c       Tue Mar 16 08:02:01 2010 +0000
@@ -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_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) {
 



Home | Main Index | Thread Index | Old Index