summaryrefslogtreecommitdiff
path: root/sys/dev/acpica/acpi_package.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpica/acpi_package.c')
-rw-r--r--sys/dev/acpica/acpi_package.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_package.c b/sys/dev/acpica/acpi_package.c
index c7e79ab29e40..65d04f2053eb 100644
--- a/sys/dev/acpica/acpi_package.c
+++ b/sys/dev/acpica/acpi_package.c
@@ -71,6 +71,19 @@ acpi_PkgInt32(ACPI_OBJECT *res, int idx, uint32_t *dst)
}
int
+acpi_PkgInt16(ACPI_OBJECT *res, int idx, uint16_t *dst)
+{
+ UINT64 tmp;
+ int error;
+
+ error = acpi_PkgInt(res, idx, &tmp);
+ if (error == 0)
+ *dst = (uint16_t)tmp;
+
+ return (error);
+}
+
+int
acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size)
{
ACPI_OBJECT *obj;