update these so they compile whether or not __BROKEN_INDIRECT_CONFIG

is defined.
This commit is contained in:
cgd 1996-12-05 01:25:23 +00:00
parent ea0c7b4423
commit 197d80c63a
22 changed files with 311 additions and 48 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: eisa.c,v 1.15 1996/10/21 22:31:01 thorpej Exp $ */
/* $NetBSD: eisa.c,v 1.16 1996/12/05 01:25:36 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou
@ -48,7 +48,11 @@
#include <dev/eisa/eisavar.h>
#include <dev/eisa/eisadevs.h>
#ifdef __BROKEN_INDIRECT_CONFIG
int eisamatch __P((struct device *, void *, void *));
#else
int eisamatch __P((struct device *, struct cfdata *, void *));
#endif
void eisaattach __P((struct device *, struct device *, void *));
struct cfattach eisa_ca = {
@ -59,16 +63,31 @@ struct cfdriver eisa_cd = {
NULL, "eisa", DV_DULL
};
#ifdef __BROKEN_INDIRECT_CONFIG
int eisasubmatch __P((struct device *, void *, void *));
#else
int eisasubmatch __P((struct device *, struct cfdata *, void *));
#endif
int eisaprint __P((void *, const char *));
void eisa_devinfo __P((const char *, char *));
int
#ifdef __BROKEN_INDIRECT_CONFIG
eisamatch(parent, match, aux)
#else
eisamatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct eisabus_attach_args *eba = aux;
if (strcmp(eba->eba_busname, cf->cf_driver->cd_name))
@ -96,17 +115,28 @@ eisaprint(aux, pnp)
}
int
#ifdef __BROKEN_INDIRECT_CONFIG
eisasubmatch(parent, match, aux)
#else
eisasubmatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct eisa_attach_args *ea = aux;
if (cf->eisacf_slot != EISA_UNKNOWN_SLOT &&
cf->eisacf_slot != ea->ea_slot)
return 0;
return ((*cf->cf_attach->ca_match)(parent, match, aux));
return ((*cf->cf_attach->ca_match)(parent, cf, aux));
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fea.c,v 1.9 1996/10/21 22:31:05 thorpej Exp $ */
/* $NetBSD: if_fea.c,v 1.10 1996/12/05 01:25:37 cgd Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@ -446,7 +446,11 @@ struct cfdriver feacd = {
static int
pdq_eisa_match(
struct device *parent,
#ifdef __BROKEN_INDIRECT_CONFIG
void *match,
#else
struct cfdata *match,
#endif
void *aux)
{
const struct eisa_attach_args * const ea = (struct eisa_attach_args *) aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.93 1996/11/13 19:41:35 cgd Exp $ */
/* $NetBSD: com.c,v 1.94 1996/12/05 01:25:38 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -138,7 +138,11 @@ static u_char tiocm_xxx2mcr __P((int));
* XXX the following two cfattach structs should be different, and possibly
* XXX elsewhere.
*/
#ifdef __BROKEN_INDIRECT_CONFIG
int comprobe __P((struct device *, void *, void *));
#else
int comprobe __P((struct device *, struct cfdata *, void *));
#endif
void comattach __P((struct device *, struct device *, void *));
#if NCOM_ISA
@ -296,7 +300,12 @@ comprobeHAYESP(hayespioh, sc)
int
comprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
bus_space_tag_t iot;
bus_space_handle_t ioh;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */
/* $NetBSD: lpt.c,v 1.43 1996/12/05 01:25:42 cgd Exp $ */
/*
* Copyright (c) 1993, 1994 Charles Hannum.
@ -111,7 +111,11 @@ struct lpt_softc {
/* XXX does not belong here */
cdev_decl(lpt);
#ifdef __BROKEN_INDIRECT_CONFIG
int lptprobe __P((struct device *, void *, void *));
#else
int lptprobe __P((struct device *, struct cfdata *, void *));
#endif
void lptattach __P((struct device *, struct device *, void *));
int lptintr __P((void *));
@ -188,7 +192,12 @@ lpt_port_test(iot, ioh, base, off, data, mask)
int
lptprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lptvar.h,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */
/* $NetBSD: lptvar.h,v 1.43 1996/12/05 01:25:42 cgd Exp $ */
/*
* Copyright (c) 1993, 1994 Charles Hannum.
@ -111,7 +111,11 @@ struct lpt_softc {
/* XXX does not belong here */
cdev_decl(lpt);
#ifdef __BROKEN_INDIRECT_CONFIG
int lptprobe __P((struct device *, void *, void *));
#else
int lptprobe __P((struct device *, struct cfdata *, void *));
#endif
void lptattach __P((struct device *, struct device *, void *));
int lptintr __P((void *));
@ -188,7 +192,12 @@ lpt_port_test(iot, ioh, base, off, data, mask)
int
lptprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.93 1996/11/13 19:41:35 cgd Exp $ */
/* $NetBSD: com.c,v 1.94 1996/12/05 01:25:38 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -138,7 +138,11 @@ static u_char tiocm_xxx2mcr __P((int));
* XXX the following two cfattach structs should be different, and possibly
* XXX elsewhere.
*/
#ifdef __BROKEN_INDIRECT_CONFIG
int comprobe __P((struct device *, void *, void *));
#else
int comprobe __P((struct device *, struct cfdata *, void *));
#endif
void comattach __P((struct device *, struct device *, void *));
#if NCOM_ISA
@ -296,7 +300,12 @@ comprobeHAYESP(hayespioh, sc)
int
comprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
bus_space_tag_t iot;
bus_space_handle_t ioh;

View File

@ -1,4 +1,4 @@
/* $NetBSD: isa.c,v 1.90 1996/11/23 21:36:44 cgd Exp $ */
/* $NetBSD: isa.c,v 1.91 1996/12/05 01:25:40 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
@ -41,7 +41,11 @@
#include <dev/isa/isareg.h>
#include <dev/isa/isavar.h>
#ifdef __BROKEN_INDIRECT_CONFIG
int isamatch __P((struct device *, void *, void *));
#else
int isamatch __P((struct device *, struct cfdata *, void *));
#endif
void isaattach __P((struct device *, struct device *, void *));
int isaprint __P((void *, const char *));
@ -50,15 +54,36 @@ struct cfattach isa_ca = {
};
struct cfdriver isa_cd = {
#ifdef __BROKEN_INDIRECT_CONFIG
NULL, "isa", DV_DULL, 1
#else
NULL, "isa", DV_DULL
#endif
};
#ifdef __BROKEN_INDIRECT_CONFIG
void isascan __P((struct device *, void *));
#else
int isasearch __P((struct device *, struct cfdata *, void *));
#endif
int
#ifdef __BROKEN_INDIRECT_CONFIG
isamatch(parent, match, aux)
#else
isamatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct isabus_attach_args *iba = aux;
if (strcmp(iba->iba_busname, cf->cf_driver->cd_name))
@ -92,7 +117,11 @@ isaattach(parent, self, aux)
panic("isaattach: can't map `delay port'"); /* XXX */
TAILQ_INIT(&sc->sc_subdevs);
#ifdef __BROKEN_INDIRECT_CONFIG
config_scan(isascan, self);
#else
config_search(isasearch, self, NULL);
#endif
}
int
@ -117,17 +146,27 @@ isaprint(aux, isa)
return (UNCONF);
}
#ifdef __BROKEN_INDIRECT_CONFIG
void
isascan(parent, match)
struct device *parent;
void *match;
#else
int
isasearch(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
void *aux;
#endif
{
struct isa_softc *sc = (struct isa_softc *)parent;
#ifdef __BROKEN_INDIRECT_CONFIG
struct device *dev = match;
struct cfdata *cf = dev->dv_cfdata;
#endif
struct isa_attach_args ia;
#ifdef __i386__
#if defined(__BROKEN_INDIRECT_CONFIG) && defined(__i386__)
if (cf->cf_fstate == FSTATE_STAR)
panic("clone devices not supported on ISA bus");
#endif
@ -143,10 +182,14 @@ isascan(parent, match)
ia.ia_drq = cf->cf_loc[5];
ia.ia_delaybah = sc->sc_delaybah;
if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0)
config_attach(parent, dev, &ia, isaprint);
if ((*cf->cf_attach->ca_match)(parent, cf, &ia) > 0)
config_attach(parent, cf, &ia, isaprint);
#ifdef __BROKEN_INDIRECT_CONFIG
else
free(dev, M_DEVBUF);
#else
return (0);
#endif
}
char *

View File

@ -1,4 +1,4 @@
/* $NetBSD: isavar.h,v 1.24 1996/10/21 22:41:11 thorpej Exp $ */
/* $NetBSD: isavar.h,v 1.25 1996/12/05 01:25:41 cgd Exp $ */
/*
* Copyright (c) 1995 Chris G. Demetriou
@ -151,7 +151,6 @@ struct isa_softc {
*/
/* ISA interrupt sharing types */
void isascan __P((struct device *parent, void *match));
char *isa_intr_typename __P((int type));
#ifdef NEWCONFIG

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */
/* $NetBSD: lpt.c,v 1.43 1996/12/05 01:25:42 cgd Exp $ */
/*
* Copyright (c) 1993, 1994 Charles Hannum.
@ -111,7 +111,11 @@ struct lpt_softc {
/* XXX does not belong here */
cdev_decl(lpt);
#ifdef __BROKEN_INDIRECT_CONFIG
int lptprobe __P((struct device *, void *, void *));
#else
int lptprobe __P((struct device *, struct cfdata *, void *));
#endif
void lptattach __P((struct device *, struct device *, void *));
int lptintr __P((void *));
@ -188,7 +192,12 @@ lpt_port_test(iot, ioh, base, off, data, mask)
int
lptprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_isa.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */
/* $NetBSD: lpt_isa.c,v 1.43 1996/12/05 01:25:42 cgd Exp $ */
/*
* Copyright (c) 1993, 1994 Charles Hannum.
@ -111,7 +111,11 @@ struct lpt_softc {
/* XXX does not belong here */
cdev_decl(lpt);
#ifdef __BROKEN_INDIRECT_CONFIG
int lptprobe __P((struct device *, void *, void *));
#else
int lptprobe __P((struct device *, struct cfdata *, void *));
#endif
void lptattach __P((struct device *, struct device *, void *));
int lptintr __P((void *));
@ -188,7 +192,12 @@ lpt_port_test(iot, ioh, base, off, data, mask)
int
lptprobe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_de.c,v 1.29 1996/10/25 21:33:30 cgd Exp $ */
/* $NetBSD: if_de.c,v 1.30 1996/12/05 01:25:23 cgd Exp $ */
/*-
* Copyright (c) 1994, 1995 Matt Thomas (matt@lkg.dec.com)
@ -2391,7 +2391,11 @@ tulip_pci_shutdown(
static int
tulip_pci_probe(
struct device *parent,
#ifdef __BROKEN_INDIRECT_CONFIG
void *match,
#else
struct cfdata *match,
#endif
void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_en_pci.c,v 1.5 1996/10/21 22:56:35 thorpej Exp $ */
/* $NetBSD: if_en_pci.c,v 1.6 1996/12/05 01:25:25 cgd Exp $ */
/*
*
@ -98,7 +98,11 @@ struct en_pci_softc {
* prototypes
*/
#ifdef __BROKEN_INDIRECT_CONFIG
static int en_pci_match __P((struct device *, void *, void *));
#else
static int en_pci_match __P((struct device *, struct cfdata *, void *));
#endif
static void en_pci_attach __P((struct device *, struct device *, void *));
/*
@ -118,7 +122,11 @@ struct cfattach en_pci_ca = {
static int en_pci_match(parent, match, aux)
struct device *parent;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */
/* $NetBSD: if_ep_pci.c,v 1.14 1996/12/05 01:25:25 cgd Exp $ */
/*
* Copyright (c) 1994 Herb Peyerl <hpeyerl@beer.org>
@ -82,7 +82,11 @@
#define PCI_CONN 0x48 /* Connector type */
#define PCI_CBIO 0x10 /* Configuration Base IO Address */
#ifdef __BROKEN_INDIRECT_CONFIG
int ep_pci_match __P((struct device *, void *, void *));
#else
int ep_pci_match __P((struct device *, struct cfdata *, void *));
#endif
void ep_pci_attach __P((struct device *, struct device *, void *));
struct cfattach ep_pci_ca = {
@ -92,7 +96,12 @@ struct cfattach ep_pci_ca = {
int
ep_pci_match(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fpa.c,v 1.15 1996/10/21 22:56:40 thorpej Exp $ */
/* $NetBSD: if_fpa.c,v 1.16 1996/12/05 01:25:26 cgd Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@ -362,7 +362,11 @@ struct cfdriver fpacd = {
static int
pdq_pci_match(
struct device *parent,
#ifdef __BROKEN_INDIRECT_CONFIG
void *match,
#else
struct cfdata *match,
#endif
void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_pci.c,v 1.13 1996/10/25 21:33:32 cgd Exp $ */
/* $NetBSD: if_le_pci.c,v 1.14 1996/12/05 01:25:27 cgd Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -80,7 +80,11 @@
#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)(va))
#endif
#ifdef __BROKEN_INDIRECT_CONFIG
int le_pci_match __P((struct device *, void *, void *));
#else
int le_pci_match __P((struct device *, struct cfdata *, void *));
#endif
void le_pci_attach __P((struct device *, struct device *, void *));
struct cfattach le_pci_ca = {
@ -127,7 +131,12 @@ le_pci_rdcsr(sc, port)
int
le_pci_match(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct pci_attach_args *pa = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr.c,v 1.52 1996/11/23 21:42:28 cgd Exp $ */
/* $NetBSD: ncr.c,v 1.53 1996/12/05 01:25:28 cgd Exp $ */
/**************************************************************************
**
@ -1313,7 +1313,11 @@ static void ncr_usercmd (ncb_p np);
static void ncr_wakeup (ncb_p np, u_long code);
#ifdef __NetBSD__
#ifdef __BROKEN_INDIRECT_CONFIG
static int ncr_probe (struct device *, void *, void *);
#else
static int ncr_probe (struct device *, struct cfdata *, void *);
#endif
static void ncr_attach (struct device *, struct device *, void *);
#else /* !__NetBSD__ */
static char* ncr_probe (pcici_t tag, pcidi_t type);
@ -1334,7 +1338,7 @@ static void ncr_attach (pcici_t tag, int unit);
#if 0
static char ident[] =
"\n$NetBSD: ncr.c,v 1.52 1996/11/23 21:42:28 cgd Exp $\n";
"\n$NetBSD: ncr.c,v 1.53 1996/12/05 01:25:28 cgd Exp $\n";
#endif
static const u_long ncr_version = NCR_VERSION * 11
@ -3289,7 +3293,12 @@ U_INT32 ncr_info (int unit)
int
ncr_probe(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct pci_attach_args *pa = aux;
#if 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci.c,v 1.25 1996/11/23 21:58:16 cgd Exp $ */
/* $NetBSD: pci.c,v 1.26 1996/12/05 01:25:30 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Christopher G. Demetriou. All rights reserved.
@ -41,7 +41,11 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#ifdef __BROKEN_INDIRECT_CONFIG
int pcimatch __P((struct device *, void *, void *));
#else
int pcimatch __P((struct device *, struct cfdata *, void *));
#endif
void pciattach __P((struct device *, struct device *, void *));
struct cfattach pci_ca = {
@ -53,7 +57,11 @@ struct cfdriver pci_cd = {
};
int pciprint __P((void *, const char *));
#ifdef __BROKEN_INDIRECT_CONFIG
int pcisubmatch __P((struct device *, void *, void *));
#else
int pcisubmatch __P((struct device *, struct cfdata *, void *));
#endif
/*
* Callback so that ISA/EISA bridges can attach their child busses
@ -80,11 +88,22 @@ static void (*pci_isa_bridge_callback) __P((void *));
static void *pci_isa_bridge_callback_arg;
int
#ifdef __BROKEN_INDIRECT_CONFIG
pcimatch(parent, match, aux)
#else
pcimatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct pcibus_attach_args *pba = aux;
if (strcmp(pba->pba_busname, cf->cf_driver->cd_name))
@ -206,11 +225,22 @@ pciprint(aux, pnp)
}
int
#ifdef __BROKEN_INDIRECT_CONFIG
pcisubmatch(parent, match, aux)
#else
pcisubmatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct pci_attach_args *pa = aux;
if (cf->pcicf_dev != PCI_UNK_DEV &&
@ -219,7 +249,7 @@ pcisubmatch(parent, match, aux)
if (cf->pcicf_function != PCI_UNK_FUNCTION &&
cf->pcicf_function != pa->pa_function)
return 0;
return ((*cf->cf_attach->ca_match)(parent, match, aux));
return ((*cf->cf_attach->ca_match)(parent, cf, aux));
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: ppb.c,v 1.12 1996/10/21 22:57:00 thorpej Exp $ */
/* $NetBSD: ppb.c,v 1.13 1996/12/05 01:25:31 cgd Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -49,7 +49,11 @@
#include <dev/pci/pcidevs.h>
#include <dev/pci/ppbreg.h>
#ifdef __BROKEN_INDIRECT_CONFIG
int ppbmatch __P((struct device *, void *, void *));
#else
int ppbmatch __P((struct device *, struct cfdata *, void *));
#endif
void ppbattach __P((struct device *, struct device *, void *));
struct cfattach ppb_ca = {
@ -65,7 +69,12 @@ int ppbprint __P((void *, const char *pnp));
int
ppbmatch(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct pci_attach_args *pa = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fta.c,v 1.7 1996/10/22 21:37:26 cgd Exp $ */
/* $NetBSD: if_fta.c,v 1.8 1996/12/05 01:25:32 cgd Exp $ */
/*-
* Copyright (c) 1996 Matt Thomas <matt@3am-software.com>
@ -66,7 +66,11 @@
static int
pdq_tc_match(
struct device *parent,
#ifdef __BROKEN_INDIRECT_CONFIG
void *match,
#else
struct cfdata *match,
#endif
void *aux)
{
struct tc_attach_args *ta = (struct tc_attach_args *) aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_ioasic.c,v 1.2 1996/05/07 02:24:56 thorpej Exp $ */
/* $NetBSD: if_le_ioasic.c,v 1.3 1996/12/05 01:25:33 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -54,7 +54,11 @@
extern caddr_t le_iomem;
#ifdef __BROKEN_INDIRECT_CONFIG
int le_ioasic_match __P((struct device *, void *, void *));
#else
int le_ioasic_match __P((struct device *, struct cfdata *, void *));
#endif
void le_ioasic_attach __P((struct device *, struct device *, void *));
hide void le_ioasic_copytobuf_gap2 __P((struct am7990_softc *, void *,
@ -75,7 +79,12 @@ struct cfattach le_ioasic_ca = {
int
le_ioasic_match(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct ioasicdev_attach_args *d = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_tc.c,v 1.2 1996/05/07 02:24:57 thorpej Exp $ */
/* $NetBSD: if_le_tc.c,v 1.3 1996/12/05 01:25:34 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -51,7 +51,11 @@
#include <dev/tc/if_levar.h>
#include <dev/tc/tcvar.h>
#ifdef __BROKEN_INDIRECT_CONFIG
int le_tc_match __P((struct device *, void *, void *));
#else
int le_tc_match __P((struct device *, struct cfdata *, void *));
#endif
void le_tc_attach __P((struct device *, struct device *, void *));
struct cfattach le_tc_ca = {
@ -65,7 +69,12 @@ struct cfattach le_tc_ca = {
int
le_tc_match(parent, match, aux)
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *match;
#endif
void *aux;
{
struct tc_attach_args *d = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tc.c,v 1.20 1996/10/22 21:37:29 cgd Exp $ */
/* $NetBSD: tc.c,v 1.21 1996/12/05 01:25:35 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -48,7 +48,11 @@ struct tc_softc {
};
/* Definition of the driver for autoconfig. */
#ifdef __BROKEN_INDIRECT_CONFIG
int tcmatch __P((struct device *, void *, void *));
#else
int tcmatch __P((struct device *, struct cfdata *, void *));
#endif
void tcattach __P((struct device *, struct device *, void *));
struct cfattach tc_ca = {
@ -60,17 +64,31 @@ struct cfdriver tc_cd = {
};
int tcprint __P((void *, const char *));
#ifdef __BROKEN_INDIRECT_CONFIG
int tcsubmatch __P((struct device *, void *, void *));
#else
int tcsubmatch __P((struct device *, struct cfdata *, void *));
#endif
int tc_checkslot __P((tc_addr_t, char *));
void tc_devinfo __P((const char *, char *));
int
#ifdef __BROKEN_INDIRECT_CONFIG
tcmatch(parent, cfdata, aux)
#else
tcmatch(parent, cf, aux)
#endif
struct device *parent;
#ifdef __BROKEN_INDIRECT_CONFIG
void *cfdata;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = cfdata;
#endif
struct tcbus_attach_args *tba = aux;
if (strcmp(tba->tba_busname, cf->cf_driver->cd_name))
@ -206,11 +224,22 @@ tcprint(aux, pnp)
}
int
#ifdef __BROKEN_INDIRECT_CONFIG
tcsubmatch(parent, match, aux)
#else
tcsubmatch(parent, cf, aux)
#endif
struct device *parent;
void *match, *aux;
#ifdef __BROKEN_INDIRECT_CONFIG
void *match;
#else
struct cfdata *cf;
#endif
void *aux;
{
#ifdef __BROKEN_INDIRECT_CONFIG
struct cfdata *cf = match;
#endif
struct tc_attach_args *d = aux;
if ((cf->tccf_slot != TCCF_SLOT_UNKNOWN) &&
@ -220,7 +249,7 @@ tcsubmatch(parent, match, aux)
(cf->tccf_offset != d->ta_offset))
return 0;
return ((*cf->cf_attach->ca_match)(parent, match, aux));
return ((*cf->cf_attach->ca_match)(parent, cf, aux));
}