diff options
author | marius <marius@FreeBSD.org> | 2010-01-01 22:47:53 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-01-01 22:47:53 +0000 |
commit | da9ce55422c150f93ddbfe59d89856ac5ed9cd53 (patch) | |
tree | c52dbb8186685662a42e1f288515a10a9fd7fb06 /sys/sparc64 | |
parent | 1081f85f8875db9dd0ef9cc96246968a3cffa424 (diff) | |
download | FreeBSD-src-da9ce55422c150f93ddbfe59d89856ac5ed9cd53.zip FreeBSD-src-da9ce55422c150f93ddbfe59d89856ac5ed9cd53.tar.gz |
Fix botches in r201005:
- Actually use the newly introduced sc_res in the front-end.
- Remove a whitespace glitch in mk48txx_gettime().
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/eeprom.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sparc64/sparc64/eeprom.c b/sys/sparc64/sparc64/eeprom.c index 6a4b1aa..da9909a 100644 --- a/sys/sparc64/sparc64/eeprom.c +++ b/sys/sparc64/sparc64/eeprom.c @@ -119,7 +119,6 @@ static int eeprom_attach(device_t dev) { struct mk48txx_softc *sc; - struct resource *res; struct timespec ts; int error, rid; @@ -128,8 +127,9 @@ eeprom_attach(device_t dev) mtx_init(&sc->sc_mtx, "eeprom_mtx", NULL, MTX_DEF); rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (res == NULL) { + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (sc->sc_res == NULL) { device_printf(dev, "cannot allocate resources\n"); error = ENXIO; goto fail_mtx; @@ -178,7 +178,7 @@ eeprom_attach(device_t dev) return (0); fail_res: - bus_release_resource(dev, SYS_RES_MEMORY, rid, res); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->sc_res); fail_mtx: mtx_destroy(&sc->sc_mtx); |