Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/cardbus Remove dead code (it is commented out).



details:   https://anonhg.NetBSD.org/src/rev/4a6c587f9c53
branches:  trunk
changeset: 752759:4a6c587f9c53
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Mar 05 22:47:03 2010 +0000

description:
Remove dead code (it is commented out).

Delete the detach routine, it's obviously not finished.

diffstat:

 sys/dev/cardbus/rbus_ppb.c |  48 ++-------------------------------------------
 1 files changed, 3 insertions(+), 45 deletions(-)

diffs (90 lines):

diff -r 8151d8e95eb0 -r 4a6c587f9c53 sys/dev/cardbus/rbus_ppb.c
--- a/sys/dev/cardbus/rbus_ppb.c        Fri Mar 05 22:18:33 2010 +0000
+++ b/sys/dev/cardbus/rbus_ppb.c        Fri Mar 05 22:47:03 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rbus_ppb.c,v 1.38 2010/03/04 18:49:14 dyoung Exp $     */
+/*     $NetBSD: rbus_ppb.c,v 1.39 2010/03/05 22:47:03 dyoung Exp $     */
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.38 2010/03/04 18:49:14 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.39 2010/03/05 22:47:03 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -78,7 +78,6 @@
 
 static int  ppb_cardbus_match(device_t, cfdata_t, void *);
 static void ppb_cardbus_attach(device_t, device_t, void *);
-static int  ppb_cardbus_detach(device_t  self, int flags);
 static int  ppb_activate(device_t, enum devact);
 int rppbprint(void *, const char *);
 int rbus_intr_fixup(pci_chipset_tag_t, int, int, int);
@@ -104,7 +103,7 @@
 };
 
 CFATTACH_DECL_NEW(rbus_ppb, sizeof(struct ppb_cardbus_softc),
-    ppb_cardbus_match, ppb_cardbus_attach, ppb_cardbus_detach, ppb_activate);
+    ppb_cardbus_match, ppb_cardbus_attach, NULL, ppb_activate);
 
 #ifdef  CBB_DEBUG
 int rbus_ppb_debug = 0;   /* hack with kdb */
@@ -509,8 +508,6 @@
         int bus, device, function, command;
        struct rbus_pci_addr_fixup_context *rct =
          (struct rbus_pci_addr_fixup_context *)context;
-       //cardbus_chipset_tag_t ct = rct->ct;
-       //      struct cardbus_softc *sc = rct->sc;
 
        pci_decompose_tag(pc, tag, &bus, &device, &function);
 
@@ -731,45 +728,6 @@
        config_found_ia(self, "pcibus", &pba, rppbprint);
 }
 
-static int
-ppb_cardbus_detach(device_t self, int flags)
-{
-  /* struct ppb_softc *sc = device_private(self);*/
-       struct ppb_cardbus_softc *csc = device_private(self);
-
-#if 0
-       struct cardbus_devfunc *ct = csc->ct;
-       int rv, reg;
-
-#ifdef DIAGNOSTIC
-       if (ct == NULL)
-               panic("%s: data structure lacks", device_xname(sc->sc_dev));
-#endif
-
-       rv = fxp_detach(sc);
-       if (rv == 0) {
-               /*
-                * Unhook the interrupt handler.
-                */
-               Cardbus_intr_disestablish(ct, sc->sc_ih);
-
-               /*
-                * release bus space and close window
-                */
-               if (csc->base0_reg)
-                       reg = PCI_BAR0;
-               else
-                       reg = PCI_BAR1;
-               Cardbus_mapreg_unmap(ct, reg, sc->sc_st, sc->sc_sh, csc->size);
-       }
-       return (rv);
-
-#endif
-       csc->foo=1;
-       return 0;
-
-}
-
 int
 ppb_activate(device_t self, enum devact act)
 {



Home | Main Index | Thread Index | Old Index