diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-02-08 23:15:59 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-02-08 23:15:59 +0000 |
commit | 27145ee3cccb3b24af3dada1976291602b6953b2 (patch) | |
tree | 18568c24b3beeb054f46920525a5fb3033b03d84 /sys/dev/i2c/i2c_scan.c | |
parent | 69626c69aa3514875cfc1468df73ca37e0eb762a (diff) |
add a member to the i2c_attach args so that a controller can pass a
cookie down to the device. the most obvious use of this is to pass a
device its ofw node on sparc64 and macppc so it can configure itself more
appropriately.
ok kettenis@ henning@ deraadt@
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r-- | sys/dev/i2c/i2c_scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c index cc0414effaf..0b8af0b91fb 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.67 2006/02/08 19:02:37 kettenis Exp $ */ +/* $OpenBSD: i2c_scan.c,v 1.68 2006/02/08 23:15:58 dlg Exp $ */ /* * Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org> @@ -640,6 +640,7 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr) #endif /* I2C_DEBUG */ if (name) { + memset(&ia, 0, sizeof(ia)); ia.ia_tag = iba->iba_tag; ia.ia_addr = addr; ia.ia_size = 1; |