From patchwork Wed Aug 10 13:54:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 73641 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp415945qga; Wed, 10 Aug 2016 06:58:58 -0700 (PDT) X-Received: by 10.194.127.163 with SMTP id nh3mr4162590wjb.74.1470837538369; Wed, 10 Aug 2016 06:58:58 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id x2si39933858wjm.38.2016.08.10.06.58.58; Wed, 10 Aug 2016 06:58:58 -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; 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 B2713A7519; Wed, 10 Aug 2016 15:58:56 +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 PcP1IE7Qx1ID; Wed, 10 Aug 2016 15:58:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 79106A751E; Wed, 10 Aug 2016 15:57:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 56FA6A750A for ; Wed, 10 Aug 2016 15:54:22 +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 pDNf4zK92bAg for ; Wed, 10 Aug 2016 15:54:22 +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 arroyo.ext.ti.com (arroyo.ext.ti.com [198.47.19.12]) by theia.denx.de (Postfix) with ESMTPS id 239454BD3D for ; Wed, 10 Aug 2016 15:54:15 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u7ADsCEX022708; Wed, 10 Aug 2016 08:54:12 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7ADsCH8013909; Wed, 10 Aug 2016 08:54:12 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Wed, 10 Aug 2016 08:54:11 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u7ADs76C008929; Wed, 10 Aug 2016 08:54:10 -0500 From: Sekhar Nori To: Tom Rini , Jaehoon Chung Date: Wed, 10 Aug 2016 19:24:03 +0530 Message-ID: <20160810135406.17255-2-nsekhar@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160810135406.17255-1-nsekhar@ti.com> References: <20160810135406.17255-1-nsekhar@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 10 Aug 2016 15:57:36 +0200 Cc: U-Boot Mailing List Subject: [U-Boot] [PATCH 1/4] drivers: mmc: omap_hsmmc: fix build breakage 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" structure member 'cd_inverted' of omap_hsmmc_data is available only when OMAP_HSMMC_USE_GPIO is defined. When CONFIG_DM_MMC is defined, but not CONFIG_OMAP_GPIO, this will cause build breakage in omap_hsmmc driver of the sort: CC drivers/mmc/omap_hsmmc.o ../drivers/mmc/omap_hsmmc.c: In function 'omap_hsmmc_ofdata_to_platdata': ../drivers/mmc/omap_hsmmc.c:1763:6: error: 'struct omap_hsmmc_data' has no member named 'cd_inverted' priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted"); ^ Fix this by accessing cd_inverted only when OMAP_HSMMC_USE_GPIO is defined. Signed-off-by: Sekhar Nori --- drivers/mmc/omap_hsmmc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index e80ac3d7220c..fceafe1f156e 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -801,7 +801,9 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev) cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT; +#ifdef OMAP_HSMMC_USE_GPIO priv->cd_inverted = fdtdec_get_bool(fdt, node, "cd-inverted"); +#endif return 0; }