use locator defines in "locators.h" to index cf_loc[]
This commit is contained in:
parent
9ed3ea9ab3
commit
d36d6d14ab
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: z8530tty.c,v 1.10 1996/12/18 05:17:44 scottr Exp $ */
|
||||
/* $NetBSD: z8530tty.c,v 1.11 1997/07/17 02:01:26 jtk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Gordon W. Ross
|
||||
@ -68,6 +68,7 @@
|
||||
/* #include <dev/ic/z8530reg.h> */
|
||||
#include "z8530reg.h"
|
||||
#include <machine/z8530var.h>
|
||||
#include "locators.h"
|
||||
|
||||
#ifdef KGDB
|
||||
extern int zs_check_kgdb();
|
||||
@ -124,11 +125,11 @@ zstty_match(parent, cf, aux)
|
||||
struct zsc_attach_args *args = aux;
|
||||
|
||||
/* Exact match is better than wildcard. */
|
||||
if (cf->cf_loc[0] == args->channel)
|
||||
if (cf->cf_loc[ZSCCF_CHANNEL] == args->channel)
|
||||
return 2;
|
||||
|
||||
/* This driver accepts wildcard. */
|
||||
if (cf->cf_loc[0] == -1)
|
||||
if (cf->cf_loc[ZSCCF_CHANNEL] == ZSCCF_CHANNEL_DEFAULT)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pccvar.h,v 1.1 1996/04/26 19:00:11 chuck Exp $ */
|
||||
/* $NetBSD: pccvar.h,v 1.2 1997/07/17 02:02:42 jtk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -60,7 +60,8 @@ struct pcc_attach_args {
|
||||
};
|
||||
|
||||
/* Shorthand for locators. */
|
||||
#define pcccf_ipl cf_loc[0]
|
||||
#include "locators.h"
|
||||
#define pcccf_ipl cf_loc[PCCCF_IPL]
|
||||
|
||||
void pccintr_establish __P((int, int (*)(void *), int, void *));
|
||||
void pccintr_disestablish __P((int));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt.c,v 1.23 1997/04/21 16:16:10 matthias Exp $ */
|
||||
/* $NetBSD: lpt.c,v 1.24 1997/07/17 02:05:14 jtk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Matthias Pfaller.
|
||||
@ -214,7 +214,7 @@ lptmatch(parent, cf, aux)
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
volatile struct i8255 *i8255 =
|
||||
(volatile struct i8255 *)((struct cfdata *)cf)->cf_loc[0];
|
||||
(volatile struct i8255 *)((struct cfdata *)cf)->cf_addr;
|
||||
int unit = ((struct cfdata *)cf)->cf_unit;
|
||||
|
||||
if (unit >= LPT_MAX)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: autoconf.h,v 1.2 1997/02/08 09:32:30 matthias Exp $ */
|
||||
/* $NetBSD: autoconf.h,v 1.3 1997/07/17 02:05:15 jtk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Matthias Pfaller.
|
||||
@ -40,8 +40,10 @@ struct confargs {
|
||||
};
|
||||
|
||||
/* Locator aliases */
|
||||
#define cf_addr cf_loc[0]
|
||||
#define cf_irq cf_loc[1]
|
||||
#include "locators.h"
|
||||
|
||||
#define cf_addr cf_loc[MAINBUSCF_ADDR]
|
||||
#define cf_irq cf_loc[MAINBUSCF_IRQ]
|
||||
|
||||
extern u_long bootdev;
|
||||
extern struct device *booted_device;
|
||||
|
@ -126,8 +126,8 @@ mbsearch(parent, cf, aux)
|
||||
{
|
||||
struct confargs ca;
|
||||
|
||||
ca.ca_addr = cf->cf_loc[0];
|
||||
ca.ca_irq = cf->cf_loc[1];
|
||||
ca.ca_addr = cf->cf_addr;
|
||||
ca.ca_irq = cf->cf_irq;
|
||||
ca.ca_flags = cf->cf_flags;
|
||||
|
||||
while ((*cf->cf_attach->ca_match)(parent, cf, &ca) > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user