The parameters to the MMCBR_ACQUIRE_HOST and MMCBR_RELEAES_HOST were

the device in question, rather than the bus doing the requesting.  Fix
it so that it is the bus.

Submitted by:	mav@
This commit is contained in:
Warner Losh 2008-09-29 01:28:30 +00:00
parent 093bb0f8cf
commit e9bb9da34d

View File

@ -176,7 +176,7 @@ mmc_acquire_bus(device_t busdev, device_t dev)
int err; int err;
int rca; int rca;
err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), dev); err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev);
if (err) if (err)
return (err); return (err);
sc = device_get_softc(busdev); sc = device_get_softc(busdev);
@ -224,7 +224,7 @@ mmc_release_bus(device_t busdev, device_t dev)
if (sc->owner != dev) if (sc->owner != dev)
panic("mmc: you don't own the bus. game over."); panic("mmc: you don't own the bus. game over.");
MMC_UNLOCK(sc); MMC_UNLOCK(sc);
err = MMCBR_RELEASE_HOST(device_get_parent(busdev), dev); err = MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev);
if (err) if (err)
return (err); return (err);
MMC_LOCK(sc); MMC_LOCK(sc);