summaryrefslogtreecommitdiff
path: root/sys/dev/onewire
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-06-23 06:27:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-06-23 06:27:13 +0000
commit8fe25da9d7762dba747313181158c50980ec44e0 (patch)
tree1549a3c414202ab70b3d2420c536b509f0fa2c81 /sys/dev/onewire
parent3d772db769af639e71686fe04b7b9bafc9aa27de (diff)
In a drivers activate() entry point, if on DVACT_DEACTIVATE it does
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP; this very popular bug has been cut and pasted a lot of times... ok deraadt@ mickey@
Diffstat (limited to 'sys/dev/onewire')
-rw-r--r--sys/dev/onewire/owid.c4
-rw-r--r--sys/dev/onewire/owtemp.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/onewire/owid.c b/sys/dev/onewire/owid.c
index 21fdb9e8b3c..38d2b1fe72b 100644
--- a/sys/dev/onewire/owid.c
+++ b/sys/dev/onewire/owid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: owid.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */
+/* $OpenBSD: owid.c,v 1.2 2006/06/23 06:27:11 miod Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -107,7 +107,7 @@ owid_activate(struct device *self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
sc->sc_dying = 1;
break;
diff --git a/sys/dev/onewire/owtemp.c b/sys/dev/onewire/owtemp.c
index 1fd5b673881..1388040c80d 100644
--- a/sys/dev/onewire/owtemp.c
+++ b/sys/dev/onewire/owtemp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: owtemp.c,v 1.1 2006/03/04 16:27:03 grange Exp $ */
+/* $OpenBSD: owtemp.c,v 1.2 2006/06/23 06:27:11 miod Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -117,7 +117,7 @@ owtemp_activate(struct device *self, enum devact act)
switch (act) {
case DVACT_ACTIVATE:
- return (EOPNOTSUPP);
+ break;
case DVACT_DEACTIVATE:
sc->sc_dying = 1;
break;