summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPavel Machek <pavel@denx.de>2014-07-21 13:30:19 +0200
committerTom Rini <trini@ti.com>2014-08-30 07:46:38 -0400
commit7860649716520cf3a7f7719fc58152d9b6bbf03b (patch)
tree8d0b3213b0f9b75e6629751fbe8a1bd1cc47a7a1 /drivers/mmc
parent99b97106f3d2ff89af70559fdfa0360ac22c536c (diff)
downloadu-boot-imx-7860649716520cf3a7f7719fc58152d9b6bbf03b.zip
u-boot-imx-7860649716520cf3a7f7719fc58152d9b6bbf03b.tar.gz
u-boot-imx-7860649716520cf3a7f7719fc58152d9b6bbf03b.tar.bz2
socfpga: cleanup socfpga_dw_mmc
Cleanups as suggested by wd on mailing list. Signed-off-by: Pavel Machek <pavel@denx.de> Acked-by: Chin Liang See <clsee@altera.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/socfpga_dw_mmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 417ca4c..1f96382 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;