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 and improve several comments.
details: https://anonhg.NetBSD.org/src/rev/a17883466135
branches: trunk
changeset: 750912:a17883466135
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Jan 18 18:49:27 2010 +0000
description:
Fix and improve several comments.
diffstat:
sys/dev/acpi/acpi.c | 41 ++++++++++++++++++++++++++---------------
1 files changed, 26 insertions(+), 15 deletions(-)
diffs (156 lines):
diff -r 64c417ae9f82 -r a17883466135 sys/dev/acpi/acpi.c
--- a/sys/dev/acpi/acpi.c Mon Jan 18 18:36:49 2010 +0000
+++ b/sys/dev/acpi/acpi.c Mon Jan 18 18:49:27 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.146 2010/01/18 18:06:31 jruoho Exp $ */
+/* $NetBSD: acpi.c,v 1.147 2010/01/18 18:49:27 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.146 2010/01/18 18:06:31 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.147 2010/01/18 18:49:27 jruoho Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@@ -161,7 +161,7 @@
extern kmutex_t acpi_interrupt_list_mtx;
/*
- * Ignored HIDs
+ * Ignored HIDs.
*/
static const char * const acpi_ignored_ids[] = {
#if defined(i386) || defined(x86_64)
@@ -464,7 +464,7 @@
acpi_softc = sc;
/*
- * Register null power management handler
+ * Register null power management handler.
*/
if (!pmf_device_register(self, acpi_suspend, acpi_resume))
aprint_error_dev(self, "couldn't establish power handler\n");
@@ -499,7 +499,7 @@
return;
}
- /* early EC handler initialization if ECDT table is available */
+ /* Early EC handler initialization if ECDT table is available. */
config_found_ia(self, "acpiecdtbus", NULL, NULL);
rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION);
@@ -598,7 +598,7 @@
return;
}
- /* early EC handler initialization if ECDT table is available */
+ /* Early EC handler initialization if ECDT table is available. */
config_found_ia(self, "acpiecdtbus", NULL, NULL);
rv = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION);
@@ -1044,7 +1044,6 @@
/*
* Check for fixed-hardware buttons.
*/
-
if ((AcpiGbl_FADT.Flags & ACPI_FADT_POWER_BUTTON) == 0) {
aprint_verbose_dev(sc->sc_dev,
"fixed-feature power button present\n");
@@ -1163,6 +1162,11 @@
return rv;
}
+/*
+ * acpi_eval_set_integer:
+ *
+ * Evaluate an integer object with a single integer input parameter.
+ */
ACPI_STATUS
acpi_eval_set_integer(ACPI_HANDLE handle, const char *path, ACPI_INTEGER arg)
{
@@ -1227,7 +1231,6 @@
return rv;
}
-
/*
* acpi_eval_struct:
*
@@ -1285,11 +1288,10 @@
/*
* acpi_foreach_package_object:
*
- * Iterate over all objects in a in a packages and pass then all
+ * Iterate over all objects in a package, and pass them all
* to a function. If the called function returns non AE_OK, the
* iteration is stopped and that value is returned.
*/
-
ACPI_STATUS
acpi_foreach_package_object(ACPI_OBJECT *pkg,
ACPI_STATUS (*func)(ACPI_OBJECT *, void *),
@@ -1310,6 +1312,15 @@
return rv;
}
+/*
+ * acpi_name:
+ *
+ * Return a complete pathname from a handle.
+ *
+ * Note that the function uses static data storage;
+ * if the data is needed for future use, it should be
+ * copied before any subsequent calls overwrite it.
+ */
const char *
acpi_name(ACPI_HANDLE handle)
{
@@ -1346,7 +1357,7 @@
/*
* acpi_match_hid
*
- * Match given ids against _HID and _CIDs
+ * Match given ids against _HID and _CIDs.
*/
int
acpi_match_hid(ACPI_DEVICE_INFO *ad, const char * const *ids)
@@ -1374,7 +1385,7 @@
/*
* acpi_wake_gpe_helper
*
- * Set/unset GPE as both Runtime and Wake
+ * Set/unset GPE as both Runtime and Wake.
*/
static void
acpi_wake_gpe_helper(ACPI_HANDLE handle, bool enable)
@@ -1440,7 +1451,7 @@
/*
* acpi_clear_wake_gpe
*
- * Clear GPE as both Runtime and Wake
+ * Clear GPE as both Runtime and Wake.
*/
void
acpi_clear_wake_gpe(ACPI_HANDLE handle)
@@ -1451,7 +1462,7 @@
/*
* acpi_set_wake_gpe
*
- * Set GPE as both Runtime and Wake
+ * Set GPE as both Runtime and Wake.
*/
void
acpi_set_wake_gpe(ACPI_HANDLE handle)
@@ -1476,7 +1487,7 @@
/*
* acpi_enter_sleep_state:
*
- * enter to the specified sleep state.
+ * Enter to the specified sleep state.
*/
ACPI_STATUS
Home |
Main Index |
Thread Index |
Old Index