From: Fabien Parent <fparent@baylibre.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/7] mmc: mtk-sd: fix configuration option check
Date: Sun, 24 Mar 2019 16:46:34 +0100 [thread overview]
Message-ID: <20190324154638.29800-4-fparent@baylibre.com> (raw)
In-Reply-To: <20190324154638.29800-1-fparent@baylibre.com>
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 <fparent@baylibre.com>
---
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
--
2.20.1
next prev parent reply other threads:[~2019-03-24 15:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-24 15:46 [U-Boot] [PATCH v3 0/7] Add support for MT8516 SoC Fabien Parent
2019-03-24 15:46 ` [U-Boot] [PATCH v3 1/7] mmc: mtk-sd: add source_cg clock support Fabien Parent
2019-04-24 13:29 ` [U-Boot] [U-Boot, v3, " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 2/7] mmc: mtk-sd: add support for MT8516 Fabien Parent
2019-04-24 13:30 ` [U-Boot] [U-Boot,v3,2/7] " Tom Rini
2019-03-24 15:46 ` Fabien Parent [this message]
2019-04-24 13:30 ` [U-Boot] [U-Boot, v3, 3/7] mmc: mtk-sd: fix configuration option check Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 4/7] clk: mediatek: add support for SETCLR_INV and NO_SETCLR flags Fabien Parent
2019-04-24 13:30 ` [U-Boot] [U-Boot, v3, " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 5/7] clk: mediatek: add driver for MT8516 Fabien Parent
2019-04-24 13:30 ` [U-Boot] [U-Boot,v3,5/7] " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 6/7] pinctrl: " Fabien Parent
2019-04-24 13:30 ` [U-Boot] [U-Boot,v3,6/7] " Tom Rini
2019-03-24 15:46 ` [U-Boot] [PATCH v3 7/7] ARM: MediaTek: Add support for MT8516 SoC Fabien Parent
2019-04-24 13:30 ` [U-Boot] [U-Boot, v3, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190324154638.29800-4-fparent@baylibre.com \
--to=fparent@baylibre.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox