summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2005-12-23 20:46:27 +0000
committerderaadt <deraadt@openbsd.org>2005-12-23 20:46:27 +0000
commitc8f6746e54e1c945d163524ba5fded8adff82e80 (patch)
treef65f78e1e422e9020677fcc142915a07d482e6cb
parentm88k suppport code for librthread. (diff)
downloadwireguard-openbsd-c8f6746e54e1c945d163524ba5fded8adff82e80.tar.xz
wireguard-openbsd-c8f6746e54e1c945d163524ba5fded8adff82e80.zip
correct ic_release_bus
-rw-r--r--sys/dev/i2c/adm1025.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/i2c/adm1025.c b/sys/dev/i2c/adm1025.c
index 687aaa00844..55be97fb7a1 100644
--- a/sys/dev/i2c/adm1025.c
+++ b/sys/dev/i2c/adm1025.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adm1025.c,v 1.7 2005/12/23 15:06:32 deraadt Exp $ */
+/* $OpenBSD: adm1025.c,v 1.8 2005/12/23 20:46:27 deraadt Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt
@@ -106,7 +106,7 @@ admtm_attach(struct device *parent, struct device *self, void *aux)
if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP,
sc->sc_addr, &cmd, sizeof cmd, &data, sizeof data, 0)) {
iic_release_bus(sc->sc_tag, 0);
- printf(": cannot set control register\n");
+ printf(": cannot get control register\n");
return;
}
data |= 0x01;
@@ -116,6 +116,7 @@ admtm_attach(struct device *parent, struct device *self, void *aux)
printf(": cannot set control register\n");
return;
}
+ iic_release_bus(sc->sc_tag, 0);
/* Initialize sensor data. */
for (i = 0; i < ADMTM_NUM_SENSORS; i++)