Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Remove superfluous activation hook.
details: https://anonhg.NetBSD.org/src/rev/6be46fad9370
branches: trunk
changeset: 749002:6be46fad9370
user: dyoung <dyoung%NetBSD.org@localhost>
date: Thu Nov 12 20:14:04 2009 +0000
description:
Remove superfluous activation hook.
Add a child-detachment hook.
diffstat:
sys/dev/ic/mb89352.c | 25 ++++++-------------------
sys/dev/ic/mb89352var.h | 3 ++-
sys/dev/pcmcia/spc_pcmcia.c | 9 +++++----
3 files changed, 13 insertions(+), 24 deletions(-)
diffs (96 lines):
diff -r e1d910248c77 -r 6be46fad9370 sys/dev/ic/mb89352.c
--- a/sys/dev/ic/mb89352.c Thu Nov 12 20:11:35 2009 +0000
+++ b/sys/dev/ic/mb89352.c Thu Nov 12 20:14:04 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mb89352.c,v 1.49 2008/06/12 22:30:30 cegger Exp $ */
+/* $NetBSD: mb89352.c,v 1.50 2009/11/12 20:14:04 dyoung Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
/*-
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.49 2008/06/12 22:30:30 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb89352.c,v 1.50 2009/11/12 20:14:04 dyoung Exp $");
#ifdef DDB
#define integrate
@@ -307,26 +307,13 @@
scsipi_adapter_delref(adapt);
}
-int
-spc_activate(device_t self, enum devact act)
+void
+spc_childdet(device_t self, device_t child)
{
struct spc_softc *sc = device_private(self);
- int s, rv = 0;
- s = splhigh();
- switch (act) {
- case DVACT_ACTIVATE:
- rv = EOPNOTSUPP;
- break;
-
- case DVACT_DEACTIVATE:
- if (sc->sc_child != NULL)
- rv = config_deactivate(sc->sc_child);
- break;
- }
- splx(s);
-
- return (rv);
+ if (sc->sc_child == child)
+ sc->sc_child = NULL;
}
int
diff -r e1d910248c77 -r 6be46fad9370 sys/dev/ic/mb89352var.h
--- a/sys/dev/ic/mb89352var.h Thu Nov 12 20:11:35 2009 +0000
+++ b/sys/dev/ic/mb89352var.h Thu Nov 12 20:14:04 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mb89352var.h,v 1.13 2009/05/12 14:25:17 cegger Exp $ */
+/* $NetBSD: mb89352var.h,v 1.14 2009/11/12 20:14:04 dyoung Exp $ */
/* NecBSD: mb89352var.h,v 1.4 1998/03/14 07:31:22 kmatsuda Exp */
/*-
@@ -230,6 +230,7 @@
void spc_attach(struct spc_softc *);
int spc_activate(device_t, enum devact);
+void spc_childdet(device_t, device_t);
int spc_detach(device_t, int);
int spc_intr(void *);
int spc_find(bus_space_tag_t, bus_space_handle_t, int);
diff -r e1d910248c77 -r 6be46fad9370 sys/dev/pcmcia/spc_pcmcia.c
--- a/sys/dev/pcmcia/spc_pcmcia.c Thu Nov 12 20:11:35 2009 +0000
+++ b/sys/dev/pcmcia/spc_pcmcia.c Thu Nov 12 20:14:04 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spc_pcmcia.c,v 1.20 2008/04/28 20:23:56 martin Exp $ */
+/* $NetBSD: spc_pcmcia.c,v 1.21 2009/11/12 20:14:04 dyoung Exp $ */
/*-
* Copyright (c) 2000, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spc_pcmcia.c,v 1.20 2008/04/28 20:23:56 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spc_pcmcia.c,v 1.21 2009/11/12 20:14:04 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -67,8 +67,9 @@
static int spc_pcmcia_detach(device_t, int);
static int spc_pcmcia_enable(device_t, int);
-CFATTACH_DECL_NEW(spc_pcmcia, sizeof(struct spc_pcmcia_softc),
- spc_pcmcia_match, spc_pcmcia_attach, spc_pcmcia_detach, spc_activate);
+CFATTACH_DECL2_NEW(spc_pcmcia, sizeof(struct spc_pcmcia_softc),
+ spc_pcmcia_match, spc_pcmcia_attach, spc_pcmcia_detach, NULL, NULL,
+ spc_childdet);
static const struct pcmcia_product spc_pcmcia_products[] = {
{ PCMCIA_VENDOR_FUJITSU, PCMCIA_PRODUCT_FUJITSU_SCSI600,
Home |
Main Index |
Thread Index |
Old Index