Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Fix a carelessness bug introduced in the revisi...



details:   https://anonhg.NetBSD.org/src/rev/a49c9366a9f8
branches:  trunk
changeset: 755977:a49c9366a9f8
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Thu Jul 01 09:28:37 2010 +0000

description:
Fix a carelessness bug introduced in the revision 1.17; acpi_power_get() now
takes a handle instead of node as a parameter. (The compiler did not catch
this as ACPI_HANDLE is a pointer to void.)

diffstat:

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

diffs (36 lines):

diff -r d8f3509afedc -r a49c9366a9f8 sys/dev/acpi/acpi_power.c
--- a/sys/dev/acpi/acpi_power.c Thu Jul 01 04:28:33 2010 +0000
+++ b/sys/dev/acpi/acpi_power.c Thu Jul 01 09:28:37 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_power.c,v 1.20 2010/06/08 21:47:26 jruoho Exp $ */
+/* $NetBSD: acpi_power.c,v 1.21 2010/07/01 09:28:37 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.20 2010/06/08 21:47:26 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_power.c,v 1.21 2010/07/01 09:28:37 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -373,7 +373,7 @@
                goto fail;
        }
 
-       if (acpi_power_get(ad, &old) != true) {
+       if (acpi_power_get(ad->ad_handle, &old) != true) {
                rv = AE_NOT_FOUND;
                goto fail;
        }
@@ -761,7 +761,7 @@
        node = *rnode;
        ad = rnode->sysctl_data;
 
-       if (acpi_power_get(ad, &state) != true)
+       if (acpi_power_get(ad->ad_handle, &state) != true)
                state = 0;
 
        (void)memset(t, '\0', sizeof(t));



Home | Main Index | Thread Index | Old Index