diff mbox series

[U-Boot,v3,3/7] mmc: mtk-sd: fix configuration option check

Message ID 20190324154638.29800-4-fparent@baylibre.com
State Accepted
Commit b5096f1b6d439d154f888febef56e7b3ecc4e37e
Delegated to: Tom Rini
Headers show
Series Add support for MT8516 SoC | expand

Commit Message

Fabien Parent March 24, 2019, 3:46 p.m. UTC
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(-)

Comments

Tom Rini April 24, 2019, 1:30 p.m. UTC | #1
On Sun, Mar 24, 2019 at 04:46:34PM +0100, Fabien Parent wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

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