Use config_stdsubmatch() instead of a local submatch function.

This commit is contained in:
simonb 2006-05-04 10:53:06 +00:00
parent e01a907378
commit 0b342c0b59
1 changed files with 3 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pbus.c,v 1.9 2005/12/11 12:17:13 christos Exp $ */
/* $NetBSD: pbus.c,v 1.10 2006/05/04 10:53:06 simonb Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pbus.c,v 1.9 2005/12/11 12:17:13 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pbus.c,v 1.10 2006/05/04 10:53:06 simonb Exp $");
#include "locators.h"
#include "pckbc.h"
@ -98,8 +98,6 @@ const struct pbus_dev {
static int pbus_match(struct device *, struct cfdata *, void *);
static void pbus_attach(struct device *, struct device *, void *);
static int pbus_submatch(struct device *, struct cfdata *,
const int *, void *);
static int pbus_print(void *, const char *);
CFATTACH_DECL(pbus, sizeof(struct device),
@ -127,19 +125,6 @@ pbus_match(struct device *parent, struct cfdata *cf, void *aux)
return (1);
}
static int
pbus_submatch(struct device *parent, struct cfdata *cf,
const int *ldesc, void *aux)
{
struct pbus_attach_args *pba = aux;
if (cf->cf_loc[PBUSCF_ADDR] != PBUSCF_ADDR_DEFAULT &&
cf->cf_loc[PBUSCF_ADDR] != pba->pb_addr)
return (0);
return (config_match(parent, cf, aux));
}
/*
* Attach the peripheral bus.
*/
@ -168,7 +153,7 @@ pbus_attach(struct device *parent, struct device *self, void *aux)
pba.pb_dmat = paa->plb_dmat;
(void) config_found_sm_loc(self, "pbus", NULL, &pba, pbus_print,
pbus_submatch);
config_stdsubmatch);
}
#if NPCKBC > 0