summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-10-06 04:09:26 +0000
committerpeter <peter@FreeBSD.org>2001-10-06 04:09:26 +0000
commitc47e8a25e5be97e7cb202bdeffac76c5543a1d31 (patch)
tree9d00bef45e70368eae40a0642afc7c0ba99f88d7 /sys/dev/acpica
parent464367cbf972289b6e7cf5b1895448405cfc6202 (diff)
downloadFreeBSD-src-c47e8a25e5be97e7cb202bdeffac76c5543a1d31.zip
FreeBSD-src-c47e8a25e5be97e7cb202bdeffac76c5543a1d31.tar.gz
Fix some 64-bit uncleanliness.
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpivar.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 7c88714..566afc4 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -136,56 +136,69 @@ acpi_AllocObjectList(int nobj)
static __inline 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, (uintptr_t *)&h))
+ if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, &up))
return(NULL);
+ h = (ACPI_HANDLE)up;
return(h);
}
static __inline int
acpi_set_handle(device_t dev, ACPI_HANDLE h)
{
+ uintptr_t up;
- return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, (uintptr_t)h));
+ up = (uintptr_t)h;
+ return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_HANDLE, up));
}
static __inline int
acpi_get_magic(device_t dev)
{
+ uintptr_t up;
int m;
- if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, (uintptr_t *)&m))
+ if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, &up))
return(0);
+ m = (int)up;
return(m);
}
static __inline int
acpi_set_magic(device_t dev, int m)
{
+ uintptr_t up;
- return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, (uintptr_t)m));
+ up = (uintptr_t)m;
+ return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_MAGIC, up));
}
static __inline void *
acpi_get_private(device_t dev)
{
+ uintptr_t up;
void *p;
- if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, (uintptr_t *)&p))
+ if (BUS_READ_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, &up))
return(NULL);
+ p = (void *)up;
return(p);
}
static __inline int
acpi_set_private(device_t dev, void *p)
{
+ uintptr_t up;
- return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, (uintptr_t)p));
+ up = (uintptr_t)p;
+ return(BUS_WRITE_IVAR(device_get_parent(dev), dev, ACPI_IVAR_PRIVATE, up));
}
static __inline ACPI_OBJECT_TYPE
-acpi_get_type(device_t dev) {
+acpi_get_type(device_t dev)
+{
ACPI_HANDLE h;
ACPI_OBJECT_TYPE t;
OpenPOWER on IntegriCloud