From 4582e297db0b2e6de20b22ea9290bfb1e811b954 Mon Sep 17 00:00:00 2001 From: patrick Date: Wed, 12 Jan 2022 11:18:30 +0000 Subject: [PATCH] Make acpi_getpropint() return uint64_t, as ACPI integers are in fact that wide and some _DSD properties depend on it. ok kettenis@ --- sys/dev/acpi/acpi.c | 6 +++--- sys/dev/acpi/acpivar.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 3f5d8ea75fa..65b53fbf6ba 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.404 2022/01/04 13:40:58 patrick Exp $ */ +/* $OpenBSD: acpi.c,v 1.405 2022/01/12 11:18:30 patrick Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -3015,8 +3015,8 @@ acpi_getprop(struct aml_node *node, const char *prop, void *buf, int buflen) return -1; } -uint32_t -acpi_getpropint(struct aml_node *node, const char *prop, uint32_t defval) +uint64_t +acpi_getpropint(struct aml_node *node, const char *prop, uint64_t defval) { struct aml_value dsd; int i; diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 706a2ae2147..ff544e70911 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.115 2021/12/26 13:55:36 kettenis Exp $ */ +/* $OpenBSD: acpivar.h,v 1.116 2022/01/12 11:18:30 patrick Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -386,7 +386,7 @@ int acpi_parsehid(struct aml_node *, void *, char *, char *, size_t); int64_t acpi_getsta(struct acpi_softc *sc, struct aml_node *); int acpi_getprop(struct aml_node *, const char *, void *, int); -uint32_t acpi_getpropint(struct aml_node *, const char *, uint32_t); +uint64_t acpi_getpropint(struct aml_node *, const char *, uint64_t); int acpi_record_event(struct acpi_softc *, u_int); -- 2.20.1