diff mbox

mmc: sdhci: add const qualifier to the name of struct sdhci_host

Message ID 1461326371-12757-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit cacd1d2f33da2d78e8568f2e48539a4a57de20ae
Headers show

Commit Message

Masahiro Yamada April 22, 2016, 11:59 a.m. UTC
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     | 2 +-
 drivers/mmc/pic32_sdhci.c | 2 +-
 drivers/mmc/zynq_sdhci.c  | 2 +-
 include/sdhci.h           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c
index 5fb7151..340eef6 100644
--- a/drivers/mmc/pci_mmc.c
+++ b/drivers/mmc/pci_mmc.c
@@ -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;
diff --git a/drivers/mmc/pic32_sdhci.c b/drivers/mmc/pic32_sdhci.c
index 28da55d..e03d6dd 100644
--- a/drivers/mmc/pic32_sdhci.c
+++ b/drivers/mmc/pic32_sdhci.c
@@ -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);
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 039ec16..b59feca 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -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;
diff --git a/include/sdhci.h b/include/sdhci.h
index 23893b5..e0f6667 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -235,7 +235,7 @@  struct sdhci_ops {
 };
 
 struct sdhci_host {
-	char *name;
+	const char *name;
 	void *ioaddr;
 	unsigned int quirks;
 	unsigned int host_caps;