summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-05-28 06:32:16 +0000
committernjl <njl@FreeBSD.org>2004-05-28 06:32:16 +0000
commit41bb6f98ab690ebf69ea3c6126c7dc11175d4f5e (patch)
treefd7890871d486cc553d44c4958c2cd65ff1eb427 /sys/dev/acpica
parentaeb7add661f8085d41c088d464c827fbc89cea49 (diff)
downloadFreeBSD-src-41bb6f98ab690ebf69ea3c6126c7dc11175d4f5e.zip
FreeBSD-src-41bb6f98ab690ebf69ea3c6126c7dc11175d4f5e.tar.gz
Pass a pointer to the sleep state instead of casting gymnastics to pass
the value itself in the pointer.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index bdd2733..9262065 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1876,14 +1876,14 @@ static ACPI_STATUS
acpi_wake_limit(ACPI_HANDLE h, UINT32 level, void *context, void **status)
{
struct acpi_prw_data prw;
- int sstate;
+ int *sstate;
/* It's ok not to have _PRW if the device can't wake the system. */
if (acpi_parse_prw(h, &prw) != 0)
return (AE_OK);
- sstate = (int)(intptr_t)context;
- if (sstate > prw.lowest_wake)
+ sstate = (int *)context;
+ if (*sstate > prw.lowest_wake)
AcpiDisableGpe(prw.gpe_handle, prw.gpe_bit, ACPI_NOT_ISR);
return (AE_OK);
@@ -1897,7 +1897,7 @@ acpi_wake_limit_walk(int sstate)
if (ACPI_SUCCESS(AcpiGetHandle(ACPI_ROOT_OBJECT, "\\_SB_", &sb_handle)))
AcpiWalkNamespace(ACPI_TYPE_ANY, sb_handle, 100,
- acpi_wake_limit, (void *)(intptr_t)sstate, NULL);
+ acpi_wake_limit, &sstate, NULL);
return (0);
}
OpenPOWER on IntegriCloud