Source-Changes-HG archive

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

[src/trunk]: src/sys/dev All that the activation hook radioactivate() did was...



details:   https://anonhg.NetBSD.org/src/rev/d247a2693245
branches:  trunk
changeset: 751001:d247a2693245
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Thu Jan 21 02:19:55 2010 +0000

description:
All that the activation hook radioactivate() did was to change
sc_dying, and nothing in the driver examines sc_dying, so get rid of
radioactivate() and sc_dying.

diffstat:

 sys/dev/radio.c |  22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diffs (55 lines):

diff -r d798ea0735ca -r d247a2693245 sys/dev/radio.c
--- a/sys/dev/radio.c   Thu Jan 21 02:14:42 2010 +0000
+++ b/sys/dev/radio.c   Thu Jan 21 02:19:55 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radio.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $ */
+/* $NetBSD: radio.c,v 1.24 2010/01/21 02:19:55 dyoung Exp $ */
 /* $OpenBSD: radio.c,v 1.2 2001/12/05 10:27:06 mickey Exp $ */
 /* $RuOBSD: radio.c,v 1.7 2001/12/04 06:03:05 tm Exp $ */
 
@@ -30,7 +30,7 @@
 /* This is the /dev/radio driver from OpenBSD */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.23 2009/12/06 22:42:48 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radio.c,v 1.24 2010/01/21 02:19:55 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -48,17 +48,15 @@
        void            *hw_hdl;        /* hardware driver handle */
        device_t        sc_dev;         /* hardware device struct */
        const struct radio_hw_if *hw_if; /* hardware interface */
-       char            sc_dying;       /* device detached */
 };
 
 static int     radioprobe(device_t, cfdata_t, void *);
 static void    radioattach(device_t, device_t, void *);
 static int     radioprint(void *, const char *);
 static int     radiodetach(device_t, int);
-static int     radioactivate(device_t, enum devact);
 
 CFATTACH_DECL_NEW(radio, sizeof(struct radio_softc),
-    radioprobe, radioattach, radiodetach, radioactivate);
+    radioprobe, radioattach, radiodetach, NULL);
 
 static dev_type_open(radioopen);
 static dev_type_close(radioclose);
@@ -195,17 +193,3 @@
 
        return (0);
 }
-
-static int
-radioactivate(device_t self, enum devact act)
-{
-       struct radio_softc *sc = device_private(self);
-
-       switch (act) {
-       case DVACT_DEACTIVATE:
-               sc->sc_dying = 1;
-               return 0;
-       default:
-               return EOPNOTSUPP;
-       }
-}



Home | Main Index | Thread Index | Old Index