allwinner mmc: move variable assignment into block
"blksz is only used in one of the two blocks, so assign it inside that block rather than outside. MFC after: 2 weeks
This commit is contained in:
parent
f0e5d3ff8e
commit
440565dad1
@ -1104,7 +1104,6 @@ aw_mmc_request(device_t bus, device_t child, struct mmc_request *req)
|
||||
}
|
||||
if (cmd->data->flags & MMC_DATA_WRITE)
|
||||
cmdreg |= AW_MMC_CMDR_DIR_WRITE;
|
||||
blksz = min(cmd->data->len, MMC_SECTOR_SIZE);
|
||||
#ifdef MMCCAM
|
||||
if (cmd->data->flags & MMC_DATA_BLOCK_SIZE) {
|
||||
AW_MMC_WRITE_4(sc, AW_MMC_BKSR, cmd->data->block_size);
|
||||
@ -1112,6 +1111,7 @@ aw_mmc_request(device_t bus, device_t child, struct mmc_request *req)
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
blksz = min(cmd->data->len, MMC_SECTOR_SIZE);
|
||||
AW_MMC_WRITE_4(sc, AW_MMC_BKSR, blksz);
|
||||
AW_MMC_WRITE_4(sc, AW_MMC_BYCR, cmd->data->len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user