Fix device/softc split.

This commit is contained in:
joerg 2008-07-09 18:02:46 +00:00
parent ec7aeae0ff
commit 53485c0add
1 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kdb.c,v 1.43 2008/06/12 21:48:01 cegger Exp $ */ /* $NetBSD: kdb.c,v 1.44 2008/07/09 18:02:46 joerg Exp $ */
/* /*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden. * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved. * All rights reserved.
@ -40,7 +40,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.43 2008/06/12 21:48:01 cegger Exp $"); __KERNEL_RCSID(0, "$NetBSD: kdb.c,v 1.44 2008/07/09 18:02:46 joerg Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/kernel.h> #include <sys/kernel.h>
@ -99,7 +99,7 @@ int kdbprint(void *, const char *);
void kdbsaerror(device_t, int); void kdbsaerror(device_t, int);
void kdbgo(device_t, struct mscp_xi *); void kdbgo(device_t, struct mscp_xi *);
CFATTACH_DECL(kdb, sizeof(struct kdb_softc), CFATTACH_DECL_NEW(kdb, sizeof(struct kdb_softc),
kdbmatch, kdbattach, NULL, NULL); kdbmatch, kdbattach, NULL, NULL);
/* /*
@ -123,10 +123,7 @@ kdbprint(void *aux, const char *name)
* Poke at a supposed KDB to see if it is there. * Poke at a supposed KDB to see if it is there.
*/ */
int int
kdbmatch(parent, cf, aux) kdbmatch(device_t parent, cfdata_t cf, void *aux)
device_t parent;
cfdata_t cf;
void *aux;
{ {
struct bi_attach_args *ba = aux; struct bi_attach_args *ba = aux;
@ -150,6 +147,8 @@ kdbattach(device_t parent, device_t self, void *aux)
int error, rseg; int error, rseg;
bus_dma_segment_t seg; bus_dma_segment_t seg;
sc->sc_dev = self;
printf("\n"); printf("\n");
bi_intr_establish(ba->ba_icookie, ba->ba_ivec, bi_intr_establish(ba->ba_icookie, ba->ba_ivec,
kdbintr, sc, &sc->sc_intrcnt); kdbintr, sc, &sc->sc_intrcnt);
@ -333,7 +332,6 @@ kdbreset(int ctlr)
#endif #endif
void void
kdbctlrdone(usc) kdbctlrdone(device_t usc)
device_t usc;
{ {
} }