Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/gpio Simplify activation hook.



details:   https://anonhg.NetBSD.org/src/rev/a2f66660c718
branches:  trunk
changeset: 748982:a2f66660c718
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Thu Nov 12 19:22:08 2009 +0000

description:
Simplify activation hook.

diffstat:

 sys/dev/gpio/gpioow.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (40 lines):

diff -r a4a4a318369a -r a2f66660c718 sys/dev/gpio/gpioow.c
--- a/sys/dev/gpio/gpioow.c     Thu Nov 12 19:20:08 2009 +0000
+++ b/sys/dev/gpio/gpioow.c     Thu Nov 12 19:22:08 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioow.c,v 1.11 2009/08/08 10:38:17 mbalmer Exp $ */
+/* $NetBSD: gpioow.c,v 1.12 2009/11/12 19:22:08 dyoung Exp $ */
 /*     $OpenBSD: gpioow.c,v 1.1 2006/03/04 16:27:03 grange Exp $       */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.11 2009/08/08 10:38:17 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpioow.c,v 1.12 2009/11/12 19:22:08 dyoung Exp $");
 
 /*
  * 1-Wire bus bit-banging through GPIO pin.
@@ -175,18 +175,14 @@
 gpioow_activate(device_t self, enum devact act)
 {
        struct gpioow_softc *sc = device_private(self);
-       int rv = 0;
 
        switch (act) {
-       case DVACT_ACTIVATE:
-               return EOPNOTSUPP;
        case DVACT_DEACTIVATE:
                sc->sc_dying = 1;
-               if (sc->sc_ow_dev != NULL)
-                       rv = config_deactivate(sc->sc_ow_dev);
-               break;
+               return 0;
+       default:
+               return EOPNOTSUPP;
        }
-       return rv;
 }
 
 int



Home | Main Index | Thread Index | Old Index