diff options
author | njl <njl@FreeBSD.org> | 2004-04-01 04:21:33 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-04-01 04:21:33 +0000 |
commit | d976b2d5bf16cbcc0c50d98ce5ac052919ba8080 (patch) | |
tree | a174c3b345526202e70d7053a55d7d893b17aa74 /sys/dev/acpica/acpi.c | |
parent | 1101a7ee8799bcd8e594454efd47d5c384257b67 (diff) | |
download | FreeBSD-src-d976b2d5bf16cbcc0c50d98ce5ac052919ba8080.zip FreeBSD-src-d976b2d5bf16cbcc0c50d98ce5ac052919ba8080.tar.gz |
Move the ivar accessing routines back to inlines (reverting acpivar.h
rev 1.44 and acpi.c rev 1.96). Now gcc can handle larger inlines and we
really need external drivers to be able to read their acpi ivars.
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 5ef1591..322ab81 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -809,82 +809,6 @@ acpi_write_ivar(device_t dev, device_t child, int index, uintptr_t value) return (0); } -ACPI_HANDLE -acpi_get_handle(device_t dev) -{ - uintptr_t up; - ACPI_HANDLE h; - - if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, &up)) - return(NULL); - h = (ACPI_HANDLE)up; - return (h); -} - -int -acpi_set_handle(device_t dev, ACPI_HANDLE h) -{ - uintptr_t up; - - up = (uintptr_t)h; - return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, up)); -} - -int -acpi_get_magic(device_t dev) -{ - uintptr_t up; - int m; - - if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, &up)) - return(0); - m = (int)up; - return (m); -} - -int -acpi_set_magic(device_t dev, int m) -{ - uintptr_t up; - - up = (uintptr_t)m; - return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, up)); -} - -void * -acpi_get_private(device_t dev) -{ - uintptr_t up; - void *p; - - if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, &up)) - return (NULL); - p = (void *)up; - return (p); -} - -int -acpi_set_private(device_t dev, void *p) -{ - uintptr_t up; - - up = (uintptr_t)p; - return (BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, up)); -} - -ACPI_OBJECT_TYPE -acpi_get_type(device_t dev) -{ - ACPI_HANDLE h; - ACPI_OBJECT_TYPE t; - - if ((h = acpi_get_handle(dev)) == NULL) - return (ACPI_TYPE_NOT_FOUND); - if (AcpiGetType(h, &t) != AE_OK) - return (ACPI_TYPE_NOT_FOUND); - return (t); -} - /* * Handle child resource allocation/removal */ |