From patchwork Fri Apr 22 11:59:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66443 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp676646qge; Fri, 22 Apr 2016 04:59:15 -0700 (PDT) X-Received: by 10.28.27.17 with SMTP id b17mr2142258wmb.19.1461326355455; Fri, 22 Apr 2016 04:59:15 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id d28si3438555wmi.69.2016.04.22.04.59.15; Fri, 22 Apr 2016 04:59:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22BDAA7646; Fri, 22 Apr 2016 13:59:14 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kHq7Ki_9K4O0; Fri, 22 Apr 2016 13:59:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7B52A7607; Fri, 22 Apr 2016 13:59:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 626D6A7607 for ; Fri, 22 Apr 2016 13:59:09 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fbNONuGo5x8x for ; Fri, 22 Apr 2016 13:59:09 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id AFCFFA75F9 for ; Fri, 22 Apr 2016 13:59:03 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id u3MBwbhr006264; Fri, 22 Apr 2016 20:58:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u3MBwbhr006264 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461326318; bh=aY4XMCvoguom+8IpiF4Lcb9sKA2Cfk+23HHYkL0vBrg=; h=From:To:Cc:Subject:Date:From; b=K1FwrsWUuAw/e76+csQGCPnRX2xZJphkpjWglMSuXhrwSaL3ELfTLnR/xaAc9PXu2 mTfPO0Jrud3Rcws1dYYf8NXNE1JbwW3GdjsWhgqLnIz8BwicK1z+TkuTdm65iZW8Q6 Hvj6s2QI7mRprn1tMSnkSTHci0luUqWnTHvjEeV7oVVGs8Islk90yPvggLPCSSTrL2 IGUi90la4ir20eghuJ82bc/ku4ndNOTVV9f8lMTRkUm3xegZZqJnDEc6cY6QdHioZA DNnlu7sgfeSPclWDV9EndV+Nb6TPa34oARTwJVzgqOSiafUX1V8/2J4INt6yPmhG/l kCP29Q9E/UsFg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 22 Apr 2016 20:59:31 +0900 Message-Id: <1461326371-12757-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Cc: Pantelis Antoniou Subject: [U-Boot] [PATCH] mmc: sdhci: add const qualifier to the name of struct sdhci_host X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This allows to drop annoying (char *) casts when setting the host name of struct sdhci_host. Signed-off-by: Masahiro Yamada --- 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 --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;