]> git.sur5r.net Git - u-boot/commitdiff
mmc: sdhci: add const qualifier to the name of struct sdhci_host
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 22 Apr 2016 11:59:31 +0000 (20:59 +0900)
committerTom Rini <trini@konsulko.com>
Mon, 25 Apr 2016 19:10:42 +0000 (15:10 -0400)
This allows to drop annoying (char *) casts when setting the host
name of struct sdhci_host.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mmc/pci_mmc.c
drivers/mmc/pic32_sdhci.c
drivers/mmc/zynq_sdhci.c
include/sdhci.h

index 5fb71518c4d819a5029c9ec53b40b2cfc0cdbd01..340eef6a1f38c49e400244a55d69f7c75ecfaedc 100644 (file)
@@ -28,7 +28,7 @@ int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported)
                if (!mmc_host)
                        return -ENOMEM;
 
-               mmc_host->name = (char *)name;
+               mmc_host->name = name;
                dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
                mmc_host->ioaddr = (void *)iobase;
                mmc_host->quirks = 0;
index 28da55d2db5e1aa8546ee6e0e7d710f06eb6b61b..e03d6dd51730f1579769986103fea8ff3bb8e043 100644 (file)
@@ -29,7 +29,7 @@ static int pic32_sdhci_probe(struct udevice *dev)
                return -EINVAL;
 
        host->ioaddr    = ioremap(addr, size);
-       host->name      = (char *)dev->name;
+       host->name      = dev->name;
        host->quirks    = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_NO_CD;
        host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
                                        "bus-width", 4);
index 039ec16e91fe4b94775773a8d705fdb82de159e4..b59feca80b5cf1d649e4b03a81eb232ecee38bf6 100644 (file)
@@ -43,7 +43,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
 {
        struct sdhci_host *host = dev_get_priv(dev);
 
-       host->name = (char *)dev->name;
+       host->name = dev->name;
        host->ioaddr = (void *)dev_get_addr(dev);
 
        return 0;
index 23893b57408056ea3cd077af2923a300e53c36fb..e0f66670b6a926aa4feacdf26fa467eed0149eb6 100644 (file)
@@ -235,7 +235,7 @@ struct sdhci_ops {
 };
 
 struct sdhci_host {
-       char *name;
+       const char *name;
        void *ioaddr;
        unsigned int quirks;
        unsigned int host_caps;