Commit e4a65ef7 authored by Jaehoon Chung's avatar Jaehoon Chung Committed by Ulf Hansson

mmc: dw_mmc: remove the 'id' arguments about functions relevant to slot

Doesn't need to pass the id value for slot functions.
Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent b23475fa
...@@ -2688,7 +2688,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) ...@@ -2688,7 +2688,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) static int dw_mci_init_slot(struct dw_mci *host)
{ {
struct mmc_host *mmc; struct mmc_host *mmc;
struct dw_mci_slot *slot; struct dw_mci_slot *slot;
...@@ -2701,8 +2701,8 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) ...@@ -2701,8 +2701,8 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
return -ENOMEM; return -ENOMEM;
slot = mmc_priv(mmc); slot = mmc_priv(mmc);
slot->id = id; slot->id = 0;
slot->sdio_id = host->sdio_id0 + id; slot->sdio_id = host->sdio_id0 + slot->id;
slot->mmc = mmc; slot->mmc = mmc;
slot->host = host; slot->host = host;
host->slot = slot; host->slot = slot;
...@@ -2801,7 +2801,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) ...@@ -2801,7 +2801,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
return ret; return ret;
} }
static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id) static void dw_mci_cleanup_slot(struct dw_mci_slot *slot)
{ {
/* Debugfs stuff is cleaned up by mmc core */ /* Debugfs stuff is cleaned up by mmc core */
mmc_remove_host(slot->mmc); mmc_remove_host(slot->mmc);
...@@ -3197,7 +3197,7 @@ int dw_mci_probe(struct dw_mci *host) ...@@ -3197,7 +3197,7 @@ int dw_mci_probe(struct dw_mci *host)
host->irq, width, fifo_size); host->irq, width, fifo_size);
/* We need at least one slot to succeed */ /* We need at least one slot to succeed */
ret = dw_mci_init_slot(host, 0); ret = dw_mci_init_slot(host);
if (ret) { if (ret) {
dev_dbg(host->dev, "slot %d init failed\n", i); dev_dbg(host->dev, "slot %d init failed\n", i);
goto err_dmaunmap; goto err_dmaunmap;
...@@ -3227,11 +3227,9 @@ EXPORT_SYMBOL(dw_mci_probe); ...@@ -3227,11 +3227,9 @@ EXPORT_SYMBOL(dw_mci_probe);
void dw_mci_remove(struct dw_mci *host) void dw_mci_remove(struct dw_mci *host)
{ {
int i = 0; dev_dbg(host->dev, "remove slot\n");
dev_dbg(host->dev, "remove slot %d\n", i);
if (host->slot) if (host->slot)
dw_mci_cleanup_slot(host->slot, i); dw_mci_cleanup_slot(host->slot);
mci_writel(host, RINTSTS, 0xFFFFFFFF); mci_writel(host, RINTSTS, 0xFFFFFFFF);
mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */ mci_writel(host, INTMASK, 0); /* disable all mmc interrupt first */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment