aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/sab/sab.c6
-rw-r--r--sys/dev/zs/zs.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 88e13d636479..46f0b3b71f78 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -446,12 +446,14 @@ sabtty_attach(device_t dev)
case 0: /* port A */
sc->sc_pvr_dtr = SAB_PVR_DTR_A;
sc->sc_pvr_dsr = SAB_PVR_DSR_A;
- sc->sc_bh = sc->sc_parent->sc_bh + SAB_CHAN_A;
+ bus_space_subregion(sc->sc_bt, sc->sc_parent->sc_bh,
+ SAB_CHAN_A, SAB_CHANLEN, &sc->sc_bh);
break;
case 1: /* port B */
sc->sc_pvr_dtr = SAB_PVR_DTR_B;
sc->sc_pvr_dsr = SAB_PVR_DSR_B;
- sc->sc_bh = sc->sc_parent->sc_bh + SAB_CHAN_B;
+ bus_space_subregion(sc->sc_bt, sc->sc_parent->sc_bh,
+ SAB_CHAN_B, SAB_CHANLEN, &sc->sc_bh);
break;
default:
return (ENXIO);
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index b1810d0563df..0814569e24fe 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -446,10 +446,12 @@ zstty_attach(device_t dev)
switch (sc->sc_channel) {
case 0:
- sc->sc_bh = sc->sc_parent->sc_bh + ZS_CHAN_A;
+ bus_space_subregion(sc->sc_bt, sc->sc_parent->sc_bh,
+ ZS_CHAN_A, ZS_CHANLEN, &sc->sc_bh);
break;
case 1:
- sc->sc_bh = sc->sc_parent->sc_bh + ZS_CHAN_B;
+ bus_space_subregion(sc->sc_bt, sc->sc_parent->sc_bh,
+ ZS_CHAN_B, ZS_CHANLEN, &sc->sc_bh);
break;
}