From 0b59005d3db469d540a520b7589518c443453630 Mon Sep 17 00:00:00 2001 From: scottr Date: Wed, 20 Mar 1996 05:10:54 +0000 Subject: [PATCH] Fix a long-standing bug uncovered by the new device attachment model. Thanks to Jason Thorpe for the fix (fixed PR 2235). --- sys/arch/mac68k/dev/mac68k5380.c | 8 ++++---- sys/arch/mac68k/dev/ncr5380.c | 4 ++-- sys/arch/mac68k/dev/ncr_sbc.c | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/arch/mac68k/dev/mac68k5380.c b/sys/arch/mac68k/dev/mac68k5380.c index 138929f12a3c..ea94942a03f6 100644 --- a/sys/arch/mac68k/dev/mac68k5380.c +++ b/sys/arch/mac68k/dev/mac68k5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: mac68k5380.c,v 1.20 1996/03/17 01:33:29 thorpej Exp $ */ +/* $NetBSD: mac68k5380.c,v 1.21 1996/03/20 05:15:50 scottr Exp $ */ /* * Copyright (c) 1995 Allen Briggs @@ -190,13 +190,13 @@ machine_match(pdp, match, auxp, cd) void *match, *auxp; struct cfdriver *cd; { - struct cfdata *cdp = match; + struct device *self = match; /* XXX mainbus is "indirect" */ - if (matchbyname(pdp, cdp, auxp) == 0) + if (matchbyname(pdp, match, auxp) == 0) return 0; if (!mac68k_machine.scsi80) return 0; - if (cdp->cf_unit != 0) + if (self->dv_cfdata->cf_unit != 0) return 0; return 1; } diff --git a/sys/arch/mac68k/dev/ncr5380.c b/sys/arch/mac68k/dev/ncr5380.c index 80860d81bf86..8aef7600d153 100644 --- a/sys/arch/mac68k/dev/ncr5380.c +++ b/sys/arch/mac68k/dev/ncr5380.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380.c,v 1.23 1996/03/17 01:33:31 thorpej Exp $ */ +/* $NetBSD: ncr5380.c,v 1.24 1996/03/20 05:15:54 scottr Exp $ */ /* * Copyright (c) 1995 Leo Weppelman. @@ -216,7 +216,7 @@ struct cfattach CANAME(DRNAME) = { }; struct cfdriver CFNAME(DRNAME) = { - NULL, CFSTRING(DRNAME), DV_DULL, NULL, 0 + NULL, CFSTRING(DRNAME), DV_DULL }; int diff --git a/sys/arch/mac68k/dev/ncr_sbc.c b/sys/arch/mac68k/dev/ncr_sbc.c index 6fc90434b454..152e776007c1 100644 --- a/sys/arch/mac68k/dev/ncr_sbc.c +++ b/sys/arch/mac68k/dev/ncr_sbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ncr_sbc.c,v 1.3 1996/03/17 01:33:33 thorpej Exp $ */ +/* $NetBSD: ncr_sbc.c,v 1.4 1996/03/20 05:10:54 scottr Exp $ */ /* * Copyright (c) 1996 Scott Reynolds @@ -196,7 +196,7 @@ struct cfattach sbc_ca = { }; struct cfdriver sbc_cd = { - NULL, sbc_name, DV_DULL, NULL, 0, + NULL, sbc_name, DV_DULL }; @@ -211,18 +211,18 @@ sbc_print(aux, name) } static int -sbc_match(parent, vcf, args) +sbc_match(parent, match, args) struct device *parent; - void *vcf, *args; + void *match, *args; { - struct cfdata *cf = vcf; + struct device *self = match; /* XXX mainbus is "indirect" */ struct confargs *ca = args; - if (matchbyname(parent, cf, ca) == 0) + if (matchbyname(parent, match, ca) == 0) return 0; if (!mac68k_machine.scsi80) return 0; - if (cf->cf_unit != 0) + if (self->dv_cfdata->cf_unit != 0) return 0; return 1; }