@@ -1557,24 +1557,19 @@ static int sdhci_execute_tuning(struct mmc_host *mmc)
*/
timeout = 150;
do {
- struct mmc_command cmd;
- struct mmc_request mrq;
+ struct mmc_command cmd = {0};
+ struct mmc_request mrq = {0};
if (!tuning_loop_counter && !timeout)
break;
- memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = MMC_SEND_TUNING_BLOCK;
cmd.arg = 0;
cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC;
-
- memset(&cmd.resp, 0, sizeof(cmd.resp));
cmd.retries = 0;
-
cmd.data = NULL;
cmd.error = 0;
- memset(&mrq, 0, sizeof(struct mmc_request));
mrq.cmd = &cmd;
host->mrq = &mrq;
@@ -1880,8 +1875,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
/* CMD19 generates _only_ Buffer Read Ready interrupt */
if (intmask & SDHCI_INT_DATA_AVAIL) {
- if (SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND))
- == MMC_SEND_TUNING_BLOCK) {
+ if (SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND)) ==
+ MMC_SEND_TUNING_BLOCK) {
host->tuning_done = 1;
wake_up(&host->buf_ready_int);
return;