From patchwork Sun Mar 24 15:46:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 1063242 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="blhgDktn"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44S1z42Vw0z9sST for ; Mon, 25 Mar 2019 02:49:04 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 10D7FC21E75; Sun, 24 Mar 2019 15:47:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 84AF7C21ECE; Sun, 24 Mar 2019 15:47:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A40AFC21ECC; Sun, 24 Mar 2019 15:47:03 +0000 (UTC) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by lists.denx.de (Postfix) with ESMTPS id D123BC21E56 for ; Sun, 24 Mar 2019 15:46:59 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id q16so6446111wmj.3 for ; Sun, 24 Mar 2019 08:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aI30GJ1EAZcTb/1GLLno/oVjqy02z8YHZ7j0nIQ3T1M=; b=blhgDktnBrv6oy3gMqiwlyBdvPyzlkHzyTga5IXQhTwx92YVJsLjvza8Okd61ckDHt y5f9RB0xMLc7MsX59i4NfdjRPyYQiVBpmR+7eFUFuYNg4tMTf5wpxEmgj1ovkpWIxNgY IGoVoX+o1qg8e5xYYVDSPP42l9d1Rb6jgmvXaADFNse0ZxvJrxhr8mAcSVEw0JwTx7QA RCV1kl8ZLsQfDAoC1TbhJoxiaUG4d9/7ofGCBTv6fPpqHhBacPMEmCi7nW3anUkoESqS lHqNGUTiYNxu9FQdejTqXYNdOcNhShBXKCGjegHnb7QfaAkoDQfNPxP4hEzTfflv0e5o SVrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aI30GJ1EAZcTb/1GLLno/oVjqy02z8YHZ7j0nIQ3T1M=; b=j1Lyaq1RK8ZWGZlJz7oJ/zN9vbv+G2xkn2rr/rC4GrTCxh8TRAwLicgjQhQ6WiQwDP F2dh7R0OGeCNyHJ3GnUD2yVqTqmYKDOE3x3ebUNvZWSKs9m23I3YhYhjlKTkIBnRycpg wiJC7OuLGfMf5VQ0lmvxBYm4zoZv0HHn+8Nn4mdbEhp69Ys+Fqg1b2tjdJLLlW8XgjfV ySBtYqECSn09F6MMFRNZ1NJql/zhUlOD6lBmNj0n5PMp8Xw273tRMvH0oR2z+oXhxv6U LOoncmJ8WZhc4Wtmkl4v5WWvtn6s4o4ddHAuysJsM3bzHAiYhCUsz9TffXgEjiKlpLMb u2NQ== X-Gm-Message-State: APjAAAVW31eerIzcvW1ZnHkarTSUNA5uv58geph35qBTsh9lnucrcjbj 4w2I2UCiNGr6plJYSOd7CXp5KjfoiYUEuwsU X-Google-Smtp-Source: APXvYqzwACapEot49wp8sUrCugfQPp82kjy376dIioJr0hb+ArE+TatLeu4lUJcbP1qe62Q87pS3Ug== X-Received: by 2002:a1c:730d:: with SMTP id d13mr2819879wmb.37.1553442419203; Sun, 24 Mar 2019 08:46:59 -0700 (PDT) Received: from localhost.localdomain (cag06-8-78-203-165-84.fbx.proxad.net. [78.203.165.84]) by smtp.gmail.com with ESMTPSA id k11sm28917683wmk.45.2019.03.24.08.46.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Mar 2019 08:46:58 -0700 (PDT) From: Fabien Parent To: u-boot@lists.denx.de Date: Sun, 24 Mar 2019 16:46:34 +0100 Message-Id: <20190324154638.29800-4-fparent@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190324154638.29800-1-fparent@baylibre.com> References: <20190324154638.29800-1-fparent@baylibre.com> MIME-Version: 1.0 Cc: trini@konsulko.com, ryder.lee@mediatek.com, stephane.leprovost@mediatek.com, GSS_MTK_Uboot_upstream@mediatek.com Subject: [U-Boot] [PATCH v3 3/7] mmc: mtk-sd: fix configuration option check X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" We either need to use IS_ENABLED(CONFIG_FOO) or CONFIG_IS_ENABLED(FOO). IS_ENABLE(FOO) will always return false. This commit fixes the comparison by using the CONFIG_IS_ENABLED(FOO) syntax. Signed-off-by: Fabien Parent --- v3: * New patch --- drivers/mmc/mtk-sd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index b44686fbc9..e0ac3e9d69 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -270,7 +270,7 @@ struct msdc_host { bool builtin_cd; /* card detection / write protection GPIOs */ -#if IS_ENABLED(DM_GPIO) +#if CONFIG_IS_ENABLED(DM_GPIO) struct gpio_desc gpio_wp; struct gpio_desc gpio_cd; #endif @@ -850,7 +850,7 @@ static int msdc_ops_get_cd(struct udevice *dev) return !(val & MSDC_PS_CDSTS); } -#if IS_ENABLED(DM_GPIO) +#if CONFIG_IS_ENABLED(DM_GPIO) if (!host->gpio_cd.dev) return 1; @@ -862,7 +862,7 @@ static int msdc_ops_get_cd(struct udevice *dev) static int msdc_ops_get_wp(struct udevice *dev) { -#if IS_ENABLED(DM_GPIO) +#if CONFIG_IS_ENABLED(DM_GPIO) struct msdc_host *host = dev_get_priv(dev); if (!host->gpio_wp.dev) @@ -1337,7 +1337,7 @@ static int msdc_ofdata_to_platdata(struct udevice *dev) clk_get_by_name(dev, "source_cg", &host->src_clk_cg); /* optional */ -#if IS_ENABLED(DM_GPIO) +#if CONFIG_IS_ENABLED(DM_GPIO) gpio_request_by_name(dev, "wp-gpios", 0, &host->gpio_wp, GPIOD_IS_IN); gpio_request_by_name(dev, "cd-gpios", 0, &host->gpio_cd, GPIOD_IS_IN); #endif