Remove superfluous activation hook.
Add a child-detachment hook.
This commit is contained in:
parent
af7d639aad
commit
2957bfb586
|
@ -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 @@ spc_attach(struct spc_softc *sc)
|
|||
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
|
||||
|
|
|
@ -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 @@ extern int spc_debug; /* SPC_SHOWSTART|SPC_SHOWMISC|SPC_SHOWTRACE; */
|
|||
|
||||
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);
|
||||
|
|
|
@ -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 void spc_pcmcia_attach(device_t, device_t, void *);
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue