Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Remove superfluous activation hook.



details:   https://anonhg.NetBSD.org/src/rev/637161afcbf7
branches:  trunk
changeset: 748991:637161afcbf7
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Thu Nov 12 19:39:26 2009 +0000

description:
Remove superfluous activation hook.

diffstat:

 sys/dev/pci/auich.c  |  26 +++-----------------------
 sys/dev/pci/azalia.c |  26 +++-----------------------
 sys/dev/pci/oboe.c   |  28 +++-------------------------
 3 files changed, 9 insertions(+), 71 deletions(-)

diffs (181 lines):

diff -r c0f4c135c1e6 -r 637161afcbf7 sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c       Thu Nov 12 19:38:35 2009 +0000
+++ b/sys/dev/pci/auich.c       Thu Nov 12 19:39:26 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auich.c,v 1.130 2009/09/03 14:29:42 sborrill Exp $     */
+/*     $NetBSD: auich.c,v 1.131 2009/11/12 19:39:26 dyoung Exp $       */
 
 /*-
  * Copyright (c) 2000, 2004, 2005 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.130 2009/09/03 14:29:42 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.131 2009/11/12 19:39:26 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -248,12 +248,10 @@
 static void    auich_attach(device_t, device_t, void *);
 static int     auich_detach(device_t, int);
 static void    auich_childdet(device_t, device_t);
-static int     auich_activate(device_t, enum devact);
 static int     auich_intr(void *);
 
 CFATTACH_DECL2_NEW(auich, sizeof(struct auich_softc),
-    auich_match, auich_attach, auich_detach, auich_activate, NULL,
-    auich_childdet);
+    auich_match, auich_attach, auich_detach, NULL, NULL, auich_childdet);
 
 static int     auich_open(void *, int);
 static void    auich_close(void *);
@@ -689,24 +687,6 @@
        return;                 /* failure of sysctl is not fatal. */
 }
 
-static int
-auich_activate(device_t self, enum devact act)
-{
-       struct auich_softc *sc = device_private(self);
-       int ret;
-
-       ret = 0;
-       switch (act) {
-       case DVACT_ACTIVATE:
-               return EOPNOTSUPP;
-       case DVACT_DEACTIVATE:
-               if (sc->sc_audiodev != NULL)
-                       ret = config_deactivate(sc->sc_audiodev);
-               return ret;
-       }
-       return EOPNOTSUPP;
-}
- 
 static void
 auich_childdet(device_t self, device_t child)
 {
diff -r c0f4c135c1e6 -r 637161afcbf7 sys/dev/pci/azalia.c
--- a/sys/dev/pci/azalia.c      Thu Nov 12 19:38:35 2009 +0000
+++ b/sys/dev/pci/azalia.c      Thu Nov 12 19:39:26 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: azalia.c,v 1.69 2009/05/06 09:25:14 cegger Exp $       */
+/*     $NetBSD: azalia.c,v 1.70 2009/11/12 19:40:19 dyoung Exp $       */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.69 2009/05/06 09:25:14 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.70 2009/11/12 19:40:19 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -155,7 +155,6 @@
 /* prototypes */
 static int     azalia_pci_match(device_t, cfdata_t, void *);
 static void    azalia_pci_attach(device_t, device_t, void *);
-static int     azalia_pci_activate(device_t, enum devact);
 static int     azalia_pci_detach(device_t, int);
 static bool    azalia_pci_resume(device_t PMF_FN_PROTO);
 static void    azalia_childdet(device_t, device_t);
@@ -226,7 +225,7 @@
 
 /* variables */
 CFATTACH_DECL2_NEW(azalia, sizeof(azalia_t),
-    azalia_pci_match, azalia_pci_attach, azalia_pci_detach, azalia_pci_activate,
+    azalia_pci_match, azalia_pci_attach, azalia_pci_detach, NULL,
     NULL, azalia_childdet);
 
 static const struct audio_hw_if azalia_hw_if = {
@@ -364,25 +363,6 @@
        config_interrupts(self, azalia_attach_intr);
 }
 
-static int
-azalia_pci_activate(device_t self, enum devact act)
-{
-       azalia_t *sc;
-       int ret;
-
-       sc = device_private(self);
-       ret = 0;
-       switch (act) {
-       case DVACT_ACTIVATE:
-               return EOPNOTSUPP;
-       case DVACT_DEACTIVATE:
-               if (sc->audiodev != NULL)
-                       ret = config_deactivate(sc->audiodev);
-               return ret;
-       }
-       return EOPNOTSUPP;
-}
-
 static void
 azalia_childdet(device_t self, device_t child)
 {
diff -r c0f4c135c1e6 -r 637161afcbf7 sys/dev/pci/oboe.c
--- a/sys/dev/pci/oboe.c        Thu Nov 12 19:38:35 2009 +0000
+++ b/sys/dev/pci/oboe.c        Thu Nov 12 19:39:26 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: oboe.c,v 1.35 2009/05/12 08:23:01 cegger Exp $ */
+/*     $NetBSD: oboe.c,v 1.36 2009/11/12 19:41:05 dyoung Exp $ */
 
 /*     XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage  */
 
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.35 2009/05/12 08:23:01 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.36 2009/11/12 19:41:05 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,7 +66,6 @@
 
 static int oboe_match(device_t parent, cfdata_t match, void *aux);
 static void oboe_attach(device_t parent, device_t self, void *aux);
-static int oboe_activate(device_t self, enum devact act);
 static int oboe_detach(device_t self, int flags);
 
 static int oboe_open(void *h, int flag, int mode, struct lwp *l);
@@ -153,7 +152,7 @@
 static int oboe_setbaud(struct oboe_softc *, int);
 
 CFATTACH_DECL(oboe, sizeof(struct oboe_softc),
-    oboe_match, oboe_attach, oboe_detach, oboe_activate);
+    oboe_match, oboe_attach, oboe_detach, NULL);
 
 static struct irframe_methods oboe_methods = {
        oboe_open, oboe_close, oboe_read, oboe_write, oboe_poll,
@@ -244,27 +243,6 @@
 }
 
 static int
-oboe_activate(device_t self, enum devact act)
-{
-       struct oboe_softc *sc = device_private(self);
-       int error = 0;
-
-       DPRINTF(("%s: sc=%p\n", __func__, sc));
-
-       switch (act) {
-       case DVACT_ACTIVATE:
-               return (EOPNOTSUPP);
-               break;
-
-       case DVACT_DEACTIVATE:
-               if (sc->sc_child != NULL)
-                       error = config_deactivate(sc->sc_child);
-               break;
-       }
-       return (error);
-}
-
-static int
 oboe_detach(device_t self, int flags)
 {
        struct oboe_softc *sc = device_private(self);



Home | Main Index | Thread Index | Old Index