/* Disable mmc interrupts */
sdi_u32 = readl(&host->base->mask0) & ~SDI_MASK0_MASK;
writel(sdi_u32, &host->base->mask0);
- strncpy(dev->name, host->name, sizeof(dev->name));
+ dev->name = host->name;
dev->ops = &arm_pl180_mmci_ops;
dev->host_caps = host->caps;
dev->voltages = host->voltages;
if (!mmc)
return -ENOMEM;
- sprintf(mmc->name, "Blackfin SDH");
+ mmc->name = "Blackfin SDH";
mmc->ops = &bfin_mmc_ops;
mmc->host_caps = MMC_MODE_4BIT;
mmc = malloc(sizeof(struct mmc));
memset(mmc, 0, sizeof(struct mmc));
- sprintf(mmc->name, "davinci");
+ mmc->name = "davinci";
mmc->priv = host;
mmc->ops = &dmmc_ops;
mmc->f_min = 200000;
mmc->priv = host;
host->mmc = mmc;
- sprintf(mmc->name, "%s", host->name);
+ mmc->name = host->name;
mmc->ops = &dwmci_ops;
mmc->f_min = min_clk;
mmc->f_max = max_clk;
return -ENOMEM;
memset(mmc, 0, sizeof(struct mmc));
- sprintf(mmc->name, "FSL_SDHC");
+ mmc->name = "FSL_SDHC";
regs = (struct fsl_esdhc *)cfg->esdhc_base;
/* First reset the eSDHC controller */
chip->regs = regs;
mmc->priv = chip;
- sprintf(mmc->name, "ftsdc010");
+ mmc->name = "ftsdc010";
mmc->ops = &ftsdc010_ops;
mmc->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz;
switch (readl(®s->bwr) & FTSDC010_BWR_CAPS_MASK) {
if (!mmc)
return -1;
- strcpy(mmc->name, "mci");
+ mmc->name = "mci";
mmc->priv = regs;
mmc->ops = &atmel_mci_ops;
free(mmc);
return NULL;
}
- sprintf(mmc->name, "MMC_SPI");
+ mmc->name = "MMC_SPI";
mmc->ops = &mmc_spi_ops;
mmc->host_caps = MMC_MODE_SPI;
if (!mmc)
return -ENOMEM;
- sprintf(mmc->name, "MXC MCI");
+ mmc->name = "MXC MCI";
mmc->ops = &mxcmci_ops;
mmc->host_caps = MMC_MODE_4BIT;
priv->id = id;
priv->regs = mxs_ssp_regs_by_bus(id);
- sprintf(mmc->name, "MXS MMC");
+ mmc->name = "MXS MMC";
mmc->ops = &mxsmmc_ops;
mmc->priv = priv;
uint host_caps_val = MMC_MODE_4BIT | MMC_MODE_HS_52MHz | MMC_MODE_HS |
MMC_MODE_HC;
- sprintf(mmc->name, "OMAP SD/MMC");
+ mmc->name = "OMAP SD/MMC";
mmc->ops = &omap_hsmmc_ops;
mmc->priv = priv_data;
mmc->priv = priv;
- sprintf(mmc->name, "PXA MMC");
+ mmc->name = "PXA MMC";
mmc->ops = &pxa_mmc_ops;
mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
mmc->priv = host;
host->mmc = mmc;
- sprintf(mmc->name, "%s", host->name);
+ mmc->name = host->name;
mmc->ops = &sdhci_ops;
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
mmc->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT |
MMC_MODE_8BIT | MMC_MODE_HC;
- memcpy(mmc->name, DRIVER_NAME, sizeof(DRIVER_NAME));
+ mmc->name = DRIVER_NAME;
mmc->ops = &sh_mmcif_ops;
host->regs = (struct sh_mmcif_regs *)CONFIG_SH_MMCIF_ADDR;
host->clk = CONFIG_SH_MMCIF_CLK;
mmc = &mmc_dev[dev_index];
- sprintf(mmc->name, "Tegra SD/MMC");
+ mmc->name = "Tegra SD/MMC";
mmc->priv = host;
mmc->ops = &tegra_mmc_ops;
struct mmc {
struct list_head link;
- char name[32];
+ const char *name; /* no need for this to be an array */
void *priv;
uint voltages;
uint version;