From: Pavel Machek Date: Mon, 21 Jul 2014 11:30:19 +0000 (+0200) Subject: socfpga: cleanup socfpga_dw_mmc X-Git-Tag: v2014.10-rc2~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7860649716520cf3a7f7719fc58152d9b6bbf03b;p=u-boot socfpga: cleanup socfpga_dw_mmc Cleanups as suggested by wd on mailing list. Signed-off-by: Pavel Machek Acked-by: Chin Liang See --- diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c index 417ca4c2ae..1f96382dea 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -16,8 +16,6 @@ static const struct socfpga_clock_manager *clock_manager_base = static const struct socfpga_system_manager *system_manager_base = (void *)SOCFPGA_SYSMGR_ADDRESS; -static char *SOCFPGA_NAME = "SOCFPGA DWMMC"; - static void socfpga_dwmci_clksel(struct dwmci_host *host) { unsigned int drvsel; @@ -45,14 +43,16 @@ static void socfpga_dwmci_clksel(struct dwmci_host *host) int socfpga_dwmmc_init(u32 regbase, int bus_width, int index) { - struct dwmci_host *host = NULL; + struct dwmci_host *host; + + /* calloc for zero init */ host = calloc(sizeof(struct dwmci_host), 1); if (!host) { printf("dwmci_host calloc fail!\n"); return -1; } - host->name = SOCFPGA_NAME; + host->name = "SOCFPGA DWMMC"; host->ioaddr = (void *)regbase; host->buswidth = bus_width; host->clksel = socfpga_dwmci_clksel;