summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-04-30 10:01:56 +0000
committerbde <bde@FreeBSD.org>2000-04-30 10:01:56 +0000
commit2c5c997046c6e9a4b46da8c795733ef867dc7053 (patch)
treeae0bd2763d4f3ed2e02b85b96cbb170999920569 /sys/dev/atkbdc
parent8b471affb9f3b118378c27a18ddbeff7fccf2186 (diff)
downloadFreeBSD-src-2c5c997046c6e9a4b46da8c795733ef867dc7053.zip
FreeBSD-src-2c5c997046c6e9a4b46da8c795733ef867dc7053.tar.gz
Fixed the type of some ivar access functions. Ivars have type uintptr_t,
not u_long. On i386's with 64-bit longs, returning u_longs indirectly in (more than) the space reserved for uintptr_t's tended to corrupt the previous frame pointer in the stack frame, so it was not easy to debug. The type mismatches are hidden by the bogus cast in DEVMETHOD().
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r--sys/dev/atkbdc/atkbdc_isa.c8
-rw-r--r--sys/dev/atkbdc/atkbdc_subr.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c
index b5d5e00..246e274 100644
--- a/sys/dev/atkbdc/atkbdc_isa.c
+++ b/sys/dev/atkbdc/atkbdc_isa.c
@@ -62,9 +62,9 @@ static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);
static int atkbdc_print_child(device_t bus, device_t dev);
static int atkbdc_read_ivar(device_t bus, device_t dev, int index,
- u_long *val);
+ uintptr_t *val);
static int atkbdc_write_ivar(device_t bus, device_t dev, int index,
- u_long val);
+ uintptr_t val);
static device_method_t atkbdc_methods[] = {
DEVMETHOD(device_probe, atkbdc_probe),
@@ -254,7 +254,7 @@ atkbdc_print_child(device_t bus, device_t dev)
}
static int
-atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
+atkbdc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val)
{
atkbdc_device_t *ivar;
@@ -285,7 +285,7 @@ atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
}
static int
-atkbdc_write_ivar(device_t bus, device_t dev, int index, u_long val)
+atkbdc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val)
{
atkbdc_device_t *ivar;
diff --git a/sys/dev/atkbdc/atkbdc_subr.c b/sys/dev/atkbdc/atkbdc_subr.c
index b5d5e00..246e274 100644
--- a/sys/dev/atkbdc/atkbdc_subr.c
+++ b/sys/dev/atkbdc/atkbdc_subr.c
@@ -62,9 +62,9 @@ static int atkbdc_probe(device_t dev);
static int atkbdc_attach(device_t dev);
static int atkbdc_print_child(device_t bus, device_t dev);
static int atkbdc_read_ivar(device_t bus, device_t dev, int index,
- u_long *val);
+ uintptr_t *val);
static int atkbdc_write_ivar(device_t bus, device_t dev, int index,
- u_long val);
+ uintptr_t val);
static device_method_t atkbdc_methods[] = {
DEVMETHOD(device_probe, atkbdc_probe),
@@ -254,7 +254,7 @@ atkbdc_print_child(device_t bus, device_t dev)
}
static int
-atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
+atkbdc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val)
{
atkbdc_device_t *ivar;
@@ -285,7 +285,7 @@ atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
}
static int
-atkbdc_write_ivar(device_t bus, device_t dev, int index, u_long val)
+atkbdc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val)
{
atkbdc_device_t *ivar;
OpenPOWER on IntegriCloud