summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/ofwi2c.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-02-08 23:15:59 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-02-08 23:15:59 +0000
commit27145ee3cccb3b24af3dada1976291602b6953b2 (patch)
tree18568c24b3beeb054f46920525a5fb3033b03d84 /sys/arch/sparc64/dev/ofwi2c.c
parent69626c69aa3514875cfc1468df73ca37e0eb762a (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/arch/sparc64/dev/ofwi2c.c')
-rw-r--r--sys/arch/sparc64/dev/ofwi2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/ofwi2c.c b/sys/arch/sparc64/dev/ofwi2c.c
index 1a7107992ef..ee2d01c0c55 100644
--- a/sys/arch/sparc64/dev/ofwi2c.c
+++ b/sys/arch/sparc64/dev/ofwi2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofwi2c.c,v 1.1 2006/01/02 01:58:55 deraadt Exp $ */
+/* $OpenBSD: ofwi2c.c,v 1.2 2006/02/08 23:15:58 dlg Exp $ */
/*
* Copyright (c) 2006 Theo de Raadt
@@ -49,8 +49,8 @@ ofwiic_scan(struct device *self, struct i2cbus_attach_args *iba, void *aux)
if (strcmp(name, "i2c-smbus") == 0) {
for (node = OF_child(node); node; node = OF_peer(node)) {
+ memset(&ia, 0, sizeof ia);
ia.ia_tag = iba->iba_tag;
- ia.ia_name = NULL;
memset(name, 0, sizeof name);
if (OF_getprop(node, "compatible", &name,
sizeof name) && name[0]) {