Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: au1xmmc: Drop redundant code in au1xmmc_send_command()

The in-parameter "wait" is always set to 0 by the caller, hence just drop
it and its corresponding code.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Link: https://lore.kernel.org/r/20200406114337.8802-1-ulf.hansson@linaro.org

+2 -18
+2 -18
drivers/mmc/host/au1xmmc.c
··· 259 259 au1xmmc_finish_request(host); 260 260 } 261 261 262 - static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, 262 + static int au1xmmc_send_command(struct au1xmmc_host *host, 263 263 struct mmc_command *cmd, struct mmc_data *data) 264 264 { 265 265 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); ··· 302 302 __raw_writel(cmd->arg, HOST_CMDARG(host)); 303 303 wmb(); /* drain writebuffer */ 304 304 305 - if (wait) 306 - IRQ_OFF(host, SD_CONFIG_CR); 307 - 308 305 __raw_writel((mmccmd | SD_CMD_GO), HOST_CMD(host)); 309 306 wmb(); /* drain writebuffer */ 310 307 311 308 /* Wait for the command to go on the line */ 312 309 while (__raw_readl(HOST_CMD(host)) & SD_CMD_GO) 313 310 /* nop */; 314 - 315 - /* Wait for the command to come back */ 316 - if (wait) { 317 - u32 status = __raw_readl(HOST_STATUS(host)); 318 - 319 - while (!(status & SD_STATUS_CR)) 320 - status = __raw_readl(HOST_STATUS(host)); 321 - 322 - /* Clear the CR status */ 323 - __raw_writel(SD_STATUS_CR, HOST_STATUS(host)); 324 - 325 - IRQ_ON(host, SD_CONFIG_CR); 326 - } 327 311 328 312 return 0; 329 313 } ··· 695 711 } 696 712 697 713 if (!ret) 698 - ret = au1xmmc_send_command(host, 0, mrq->cmd, mrq->data); 714 + ret = au1xmmc_send_command(host, mrq->cmd, mrq->data); 699 715 700 716 if (ret) { 701 717 mrq->cmd->error = ret;