summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2006-02-26 18:38:54 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2006-02-26 18:38:54 +0000
commit0d6a93a56c7107d7c5934924530237d8f092b384 (patch)
tree823a357e5b11ffe24b9c165fe5372ed4753c145c /sys/dev/i2c
parent32c28c7e11fd8aa9c6f67ffa083f05a772320e53 (diff)
Don't touch i2c bus tag internals directly.
ok deraadt@
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/i2c_scan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 39547169f16..68f03341605 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.70 2006/02/25 21:38:56 kettenis Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.71 2006/02/26 18:38:53 grange Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -97,11 +97,11 @@ iicprobenc(u_int8_t cmd)
*/
if (skip_fc && cmd == 0xfc)
return (0xff);
- probe_ic->ic_acquire_bus(probe_ic->ic_cookie, 0);
+ iic_acquire_bus(probe_ic, 0);
if (iic_exec(probe_ic, I2C_OP_READ_WITH_STOP,
probe_addr, &cmd, 1, &data, 1, 0) != 0)
data = 0xff;
- probe_ic->ic_release_bus(probe_ic->ic_cookie, 0);
+ iic_release_bus(probe_ic, 0);
return (data);
}
@@ -116,11 +116,11 @@ iicprobew(u_int8_t cmd)
*/
if (skip_fc && cmd == 0xfc)
return (0xffff);
- probe_ic->ic_acquire_bus(probe_ic->ic_cookie, 0);
+ iic_acquire_bus(probe_ic, 0);
if (iic_exec(probe_ic, I2C_OP_READ_WITH_STOP,
probe_addr, &cmd, 1, &data, 2, 0) != 0)
data[0] = data[1] = 0xff;
- probe_ic->ic_release_bus(probe_ic->ic_cookie, 0);
+ iic_release_bus(probe_ic, 0);
return ((data[0] << 8) | data[1]);
}
@@ -671,18 +671,18 @@ iic_scan(struct device *self, struct i2cbus_attach_args *iba)
for (addr = probe_addrs[i].start; addr <= probe_addrs[i].end;
addr++) {
/* Perform RECEIVE BYTE command */
- ic->ic_acquire_bus(ic->ic_cookie, 0);
+ iic_acquire_bus(ic, 0);
if (iic_exec(ic, I2C_OP_READ_WITH_STOP, addr,
&cmd, 1, NULL, 0, 0) == 0) {
- ic->ic_release_bus(ic->ic_cookie, 0);
+ iic_release_bus(ic, 0);
/* Some device exists, so go scope it out */
iic_probe(self, iba, addr);
- ic->ic_acquire_bus(ic->ic_cookie, 0);
+ iic_acquire_bus(ic, 0);
}
- ic->ic_release_bus(ic->ic_cookie, 0);
+ iic_release_bus(ic, 0);
}
}
}