From e5113c333b318328619f8cf2d9984f05fc5c3b59 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Fri, 23 Sep 2016 19:13:16 +0900 Subject: mmc: dw_mmc: remove the unnecessary arguments for dwmci_setup_cfg Some arguments don't need to pass to dwmci_setup_cfg. They are already included in dwmci_host structure. Signed-off-by: Jaehoon Chung Reviewed-by: Simon Glass --- drivers/mmc/dw_mmc.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'drivers/mmc/dw_mmc.c') diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 074f86c..d6ac46c 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -488,10 +488,10 @@ static const struct mmc_ops dwmci_ops = { }; #endif -void dwmci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, - uint caps, u32 max_clk, u32 min_clk) +void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host, + u32 max_clk, u32 min_clk) { - cfg->name = name; + cfg->name = host->name; #ifndef CONFIG_DM_MMC_OPS cfg->ops = &dwmci_ops; #endif @@ -500,9 +500,9 @@ void dwmci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth, cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; - cfg->host_caps = caps; + cfg->host_caps = host->caps; - if (buswidth == 8) { + if (host->buswidth == 8) { cfg->host_caps |= MMC_MODE_8BIT; cfg->host_caps &= ~MMC_MODE_4BIT; } else { @@ -522,8 +522,7 @@ int dwmci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg) #else int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk) { - dwmci_setup_cfg(&host->cfg, host->name, host->buswidth, host->caps, - max_clk, min_clk); + dwmci_setup_cfg(&host->cfg, host, max_clk, min_clk); host->mmc = mmc_create(&host->cfg, host); if (host->mmc == NULL) -- cgit v1.1