svn commit: r201371 - in head/sys: dev/mk48txx sparc64/sparc64
Marius Strobl
marius at FreeBSD.org
Fri Jan 1 22:47:53 UTC 2010
Author: marius
Date: Fri Jan 1 22:47:53 2010
New Revision: 201371
URL: http://svn.freebsd.org/changeset/base/201371
Log:
Fix botches in r201005:
- Actually use the newly introduced sc_res in the front-end.
- Remove a whitespace glitch in mk48txx_gettime().
Modified:
head/sys/dev/mk48txx/mk48txx.c
head/sys/sparc64/sparc64/eeprom.c
Modified: head/sys/dev/mk48txx/mk48txx.c
==============================================================================
--- head/sys/dev/mk48txx/mk48txx.c Fri Jan 1 22:10:07 2010 (r201370)
+++ head/sys/dev/mk48txx/mk48txx.c Fri Jan 1 22:47:53 2010 (r201371)
@@ -184,7 +184,7 @@ mk48txx_gettime(device_t dev, struct tim
* Set dow = -1 because some drivers (for example the NetBSD and
* OpenBSD mk48txx(4)) don't set it correctly.
*/
- ct.dow = - 1;
+ ct.dow = -1;
#endif
ct.mon = FROMBCD(FROMREG(MK48TXX_IMON, MK48TXX_MON_MASK));
year = FROMBCD(FROMREG(MK48TXX_IYEAR, MK48TXX_YEAR_MASK));
Modified: head/sys/sparc64/sparc64/eeprom.c
==============================================================================
--- head/sys/sparc64/sparc64/eeprom.c Fri Jan 1 22:10:07 2010 (r201370)
+++ head/sys/sparc64/sparc64/eeprom.c Fri Jan 1 22:47:53 2010 (r201371)
@@ -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);
More information about the svn-src-head
mailing list