diff options
author | 2005-11-16 00:09:31 +0000 | |
---|---|---|
committer | 2005-11-16 00:09:31 +0000 | |
commit | 1ea7ad3d05185df9a3bad43c45c22e482bb17e73 (patch) | |
tree | 4a7f52dcda4caa5cf99f0fd194af4a9a017b2c49 /sys | |
parent | add a configuration option for specifying a non-standard port and multicast (diff) | |
download | wireguard-openbsd-1ea7ad3d05185df9a3bad43c45c22e482bb17e73.tar.xz wireguard-openbsd-1ea7ad3d05185df9a3bad43c45c22e482bb17e73.zip |
some older apple machines did not have a 'regs' property for i2c devices,
but 'i2c-address'. some have both. crazy. ok drahn
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/dev/maci2c.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/macppc/dev/maci2c.c b/sys/arch/macppc/dev/maci2c.c index 5b99452f577..554e543b9f8 100644 --- a/sys/arch/macppc/dev/maci2c.c +++ b/sys/arch/macppc/dev/maci2c.c @@ -1,4 +1,4 @@ -/* $OpenBSD: maci2c.c,v 1.2 2005/11/15 16:23:34 deraadt Exp $ */ +/* $OpenBSD: maci2c.c,v 1.3 2005/11/16 00:09:31 deraadt Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -55,7 +55,8 @@ maciic_attach(struct device *parent, struct device *self, void *aux) printf("\n"); for (node = OF_child(iba->iba_node); node; node = OF_peer(node)) { - if (OF_getprop(node, "reg", ®, sizeof reg) != sizeof reg) + if (OF_getprop(node, "reg", ®, sizeof reg) != sizeof reg && + OF_getprop(node, "i2c-address", ®, sizeof reg) != sizeof reg) continue; ia.ia_tag = iba->iba_tag; ia.ia_addr = (reg >> 1); |