From 27145ee3cccb3b24af3dada1976291602b6953b2 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Wed, 8 Feb 2006 23:15:59 +0000 Subject: 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@ --- sys/arch/sparc64/dev/ofwi2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev/ofwi2c.c') 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]) { -- cgit v1.2.3