summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-02-26 20:24:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-02-26 20:24:47 +0000
commit3b8ef19613b202a26ab7380d0a767675a3298de7 (patch)
tree9b6dc39806d522085b1b74c370183abfd80b7b2d /sys/dev
parent285c2b30943239d073b8082cad78dffa21b1b155 (diff)
if ipmi is on the machine: instead of (confusingly) failing in match,
bail out in attach, and also say why; ok marco
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/i2c/i2c.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/i2c/i2c.c b/sys/dev/i2c/i2c.c
index 15491a9ab74..be0a8dc710f 100644
--- a/sys/dev/i2c/i2c.c
+++ b/sys/dev/i2c/i2c.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c.c,v 1.13 2006/02/08 23:15:58 dlg Exp $ */
+/* $OpenBSD: i2c.c,v 1.14 2006/02/26 20:24:46 deraadt Exp $ */
/* $NetBSD: i2c.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */
/*
@@ -118,13 +118,6 @@ iic_match(struct device *parent, void *arg, void *aux)
struct cfdata *cf = arg;
struct i2cbus_attach_args *iba = aux;
-#if NIPMI > 0
- extern int ipmi_enabled;
-
- if (ipmi_enabled)
- return (0);
-#endif
-
/* Just make sure we're looking for i2c. */
return (strcmp(iba->iba_name, cf->cf_driver->cd_name) == 0);
}
@@ -137,6 +130,15 @@ iic_attach(struct device *parent, struct device *self, void *aux)
sc->sc_tag = iba->iba_tag;
+#if NIPMI > 0
+ extern int ipmi_enabled;
+
+ if (ipmi_enabled) {
+ printf(": disabled to avoid ipmi0 interactions\n");
+ return;
+ }
+#endif
+
printf("\n");
/*