git: c6960a68817c - stable/13 - pbio: Axe bus_space tag/handle using bus_read/write_1 instead.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 20 May 2022 00:21:02 UTC
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=c6960a68817cc124e3c4ead10850f5a2e4f517e2

commit c6960a68817cc124e3c4ead10850f5a2e4f517e2
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-05-05 23:38:51 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-05-19 22:01:50 +0000

    pbio: Axe bus_space tag/handle using bus_read/write_1 instead.
    
    Differential Revision:  https://reviews.freebsd.org/D35079
    
    (cherry picked from commit bb81a138c36aad8359e3599b14b46817ea00e16a)
---
 sys/dev/pbio/pbio.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/sys/dev/pbio/pbio.c b/sys/dev/pbio/pbio.c
index 042a92e39f42..837b419e298c 100644
--- a/sys/dev/pbio/pbio.c
+++ b/sys/dev/pbio/pbio.c
@@ -117,8 +117,6 @@ struct pbio_softc {
 	int	iomode;			/* Virtualized I/O mode port value */
 					/* The real port is write-only */
 	struct resource *res;
-	bus_space_tag_t bst;
-	bus_space_handle_t bsh;
 };
 
 typedef	struct pbio_softc *sc_p;
@@ -146,14 +144,14 @@ static __inline uint8_t
 pbinb(struct pbio_softc *scp, int off)
 {
 
-	return bus_space_read_1(scp->bst, scp->bsh, off);
+	return (bus_read_1(scp->res, off));
 }
 
 static __inline void
 pboutb(struct pbio_softc *scp, int off, uint8_t val)
 {
 
-	bus_space_write_1(scp->bst, scp->bsh, off, val);
+	bus_write_1(scp->res, off, val);
 }
 
 static int
@@ -174,8 +172,6 @@ pbioprobe(device_t dev)
 		return (ENXIO);
 
 #ifdef GENERIC_PBIO_PROBE
-	scp->bst = rman_get_bustag(scp->res);
-	scp->bsh = rman_get_bushandle(scp->res);
 	/*
 	 * try see if the device is there.
 	 * This probe works only if the device has no I/O attached to it
@@ -228,8 +224,6 @@ pbioattach (device_t dev)
 	    IO_PBIOSIZE, RF_ACTIVE);
 	if (sc->res == NULL)
 		return (ENXIO);
-	sc->bst = rman_get_bustag(sc->res);
-	sc->bsh = rman_get_bushandle(sc->res);
 
 	/*
 	 * Store whatever seems wise.