diff options
author | 2011-06-20 01:09:25 +0000 | |
---|---|---|
committer | 2011-06-20 01:09:25 +0000 | |
commit | e5ad99e7d8bdc8c0147451426ba3f3b5a552e3d2 (patch) | |
tree | 1343cfb3c9246e58fe0549bed37e6820d187991c /sys/dev/isa/wdc_isa.c | |
parent | Unbreak (diff) | |
download | wireguard-openbsd-e5ad99e7d8bdc8c0147451426ba3f3b5a552e3d2.tar.xz wireguard-openbsd-e5ad99e7d8bdc8c0147451426ba3f3b5a552e3d2.zip |
isa(4) is an indirect bus, which means that drivers that attach to it
need to provide an xxxprobe() method instead of an xxxmatch() method.
The critical difference is xxxprobe() is given a device softc for the
second argument, whereas a xxxmatch() is given the cfdata as the
second argument.
This commit fixes the handful of ISA device drivers that incorrectly
cast the second argument to a "struct cfdata *" instead of a "struct
device *". (Minor complication: unlike isa(4), isapnp(4) is a direct
bus, and if_we.c used the same probe/match code for both; now separate
we_probe and we_match methods are used as appropriate.)
"makes sense to me" krw@; ok miod@
Diffstat (limited to 'sys/dev/isa/wdc_isa.c')
-rw-r--r-- | sys/dev/isa/wdc_isa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/isa/wdc_isa.c b/sys/dev/isa/wdc_isa.c index 5c683da88c1..1cf488a954a 100644 --- a/sys/dev/isa/wdc_isa.c +++ b/sys/dev/isa/wdc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc_isa.c,v 1.14 2011/05/09 22:33:54 matthew Exp $ */ +/* $OpenBSD: wdc_isa.c,v 1.15 2011/06/20 01:09:25 matthew Exp $ */ /* $NetBSD: wdc_isa.c,v 1.15 1999/05/19 14:41:25 bouyer Exp $ */ /*- @@ -83,7 +83,7 @@ wdc_isa_probe(struct device *parent, void *match, void *aux) { struct channel_softc ch; struct isa_attach_args *ia = aux; - struct cfdata *cf = match; + struct cfdata *cf = ((struct device *)match)->dv_cfdata; int result = 0; bzero(&ch, sizeof ch); |