remove macros which just hide cfdata internals
(and are used at one place only)
This commit is contained in:
parent
428bbd1acc
commit
a987cab220
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pci.c,v 1.88 2004/08/30 15:05:20 drochner Exp $ */
|
||||
/* $NetBSD: pci.c,v 1.89 2004/09/13 12:22:52 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997, 1998
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.88 2004/08/30 15:05:20 drochner Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.89 2004/09/13 12:22:52 drochner Exp $");
|
||||
|
||||
#include "opt_pci.h"
|
||||
|
||||
@ -112,8 +112,8 @@ pcimatch(parent, cf, aux)
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
||||
/* Check the locators */
|
||||
if (cf->pcibuscf_bus != PCIBUS_UNK_BUS &&
|
||||
cf->pcibuscf_bus != pba->pba_bus)
|
||||
if (cf->cf_loc[PCIBUSCF_BUS] != PCIBUSCF_BUS_DEFAULT &&
|
||||
cf->cf_loc[PCIBUSCF_BUS] != pba->pba_bus)
|
||||
return (0);
|
||||
|
||||
/* sanity */
|
||||
@ -263,11 +263,11 @@ pcisubmatch(struct device *parent, struct cfdata *cf,
|
||||
const locdesc_t *ldesc, void *aux)
|
||||
{
|
||||
|
||||
if (cf->pcicf_dev != PCI_UNK_DEV &&
|
||||
cf->pcicf_dev != ldesc->locs[PCICF_DEV])
|
||||
if (cf->cf_loc[PCICF_DEV] != PCICF_DEV_DEFAULT &&
|
||||
cf->cf_loc[PCICF_DEV] != ldesc->locs[PCICF_DEV])
|
||||
return (0);
|
||||
if (cf->pcicf_function != PCI_UNK_FUNCTION &&
|
||||
cf->pcicf_function != ldesc->locs[PCICF_FUNCTION])
|
||||
if (cf->cf_loc[PCICF_FUNCTION] != PCICF_FUNCTION_DEFAULT &&
|
||||
cf->cf_loc[PCICF_FUNCTION] != ldesc->locs[PCICF_FUNCTION])
|
||||
return (0);
|
||||
return (config_match(parent, cf, aux));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcivar.h,v 1.66 2004/08/30 15:05:20 drochner Exp $ */
|
||||
/* $NetBSD: pcivar.h,v 1.67 2004/09/13 12:22:53 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
@ -173,21 +173,6 @@ struct pci_softc {
|
||||
|
||||
extern struct cfdriver pci_cd;
|
||||
|
||||
/*
|
||||
* Locators devices that attach to 'pcibus', as specified to config.
|
||||
*/
|
||||
#define pcibuscf_bus cf_loc[PCIBUSCF_BUS]
|
||||
#define PCIBUS_UNK_BUS PCIBUSCF_BUS_DEFAULT /* wildcarded 'bus' */
|
||||
|
||||
/*
|
||||
* Locators for PCI devices, as specified to config.
|
||||
*/
|
||||
#define pcicf_dev cf_loc[PCICF_DEV]
|
||||
#define PCI_UNK_DEV PCICF_DEV_DEFAULT /* wildcarded 'dev' */
|
||||
|
||||
#define pcicf_function cf_loc[PCICF_FUNCTION]
|
||||
#define PCI_UNK_FUNCTION PCICF_FUNCTION_DEFAULT /* wildcarded 'function' */
|
||||
|
||||
int pcibusprint(void *, const char *);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user