mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
mmc: sdhci: add const qualifier to the name of struct sdhci_host
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>
This commit is contained in:
parent
e52e334e5c
commit
cacd1d2f33
4 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported)
|
||||||
if (!mmc_host)
|
if (!mmc_host)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
mmc_host->name = (char *)name;
|
mmc_host->name = name;
|
||||||
dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
|
dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
|
||||||
mmc_host->ioaddr = (void *)iobase;
|
mmc_host->ioaddr = (void *)iobase;
|
||||||
mmc_host->quirks = 0;
|
mmc_host->quirks = 0;
|
||||||
|
|
|
@ -29,7 +29,7 @@ static int pic32_sdhci_probe(struct udevice *dev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
host->ioaddr = ioremap(addr, size);
|
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->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_NO_CD;
|
||||||
host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
|
||||||
"bus-width", 4);
|
"bus-width", 4);
|
||||||
|
|
|
@ -43,7 +43,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct sdhci_host *host = dev_get_priv(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);
|
host->ioaddr = (void *)dev_get_addr(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -235,7 +235,7 @@ struct sdhci_ops {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sdhci_host {
|
struct sdhci_host {
|
||||||
char *name;
|
const char *name;
|
||||||
void *ioaddr;
|
void *ioaddr;
|
||||||
unsigned int quirks;
|
unsigned int quirks;
|
||||||
unsigned int host_caps;
|
unsigned int host_caps;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue