All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 08/12] mmc: fsl_esdhc: switch to use CONFIG_IS_ENABLED
Date: Mon, 28 Aug 2017 14:29:00 +0800	[thread overview]
Message-ID: <1503901744-21087-8-git-send-email-peng.fan@nxp.com> (raw)
In-Reply-To: <1503901744-21087-1-git-send-email-peng.fan@nxp.com>

Switch to use CONFIG_IS_ENABLED.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
---

V2: none

 drivers/mmc/fsl_esdhc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index cc188c4..aa02bd6 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -113,7 +113,7 @@ struct fsl_esdhc_priv {
 	int non_removable;
 	int wp_enable;
 	int vs18_enable;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 	struct gpio_desc cd_gpio;
 	struct gpio_desc wp_gpio;
 #endif
@@ -695,7 +695,7 @@ static int esdhc_getcd_common(struct fsl_esdhc_priv *priv)
 #if CONFIG_IS_ENABLED(DM_MMC)
 	if (priv->non_removable)
 		return 1;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 	if (dm_gpio_is_valid(&priv->cd_gpio))
 		return dm_gpio_get_value(&priv->cd_gpio);
 #endif
@@ -1048,7 +1048,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
 		priv->non_removable = 1;
 	 } else {
 		priv->non_removable = 0;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 		gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio,
 				     GPIOD_IS_IN);
 #endif
@@ -1056,7 +1056,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
 
 	priv->wp_enable = 1;
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 	ret = gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio,
 				   GPIOD_IS_IN);
 	if (ret)
-- 
2.6.2

  parent reply	other threads:[~2017-08-28  6:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28  6:28 [U-Boot] [PATCH V2 01/12] scripts: spl: fix typo Peng Fan
2017-08-28  6:28 ` [U-Boot] [PATCH V2 02/12] arm: dts: include dts for imx6sabresd Peng Fan
2017-08-28  6:40   ` Jagan Teki
2017-08-28  6:45     ` Peng Fan
2017-08-28  7:06       ` Stefano Babic
2017-08-28  7:17         ` Peng Fan
2017-08-28  7:20         ` Jagan Teki
2017-08-28  7:29           ` Stefano Babic
2017-08-28 11:14         ` Fabio Estevam
2017-08-28  6:28 ` [U-Boot] [PATCH V2 03/12] power: pmic/regulator allow dm be omited by SPL Peng Fan
2017-08-28  6:28 ` [U-Boot] [PATCH V2 04/12] Makefile: build FIT image if CONFIG_SPL_FIT_GENERATOR defined Peng Fan
2017-08-28  6:28 ` [U-Boot] [PATCH V2 05/12] imx: introduce mkimage_fit.sh Peng Fan
2017-08-28  6:28 ` [U-Boot] [PATCH V2 06/12] imx: mx6sabresd: implement board_fit_config_name_match Peng Fan
2017-08-28  6:28 ` [U-Boot] [PATCH V2 07/12] imx: mx6sabresd: enable SPL FIT Peng Fan
2017-08-28  6:29 ` Peng Fan [this message]
2017-08-28  6:29 ` [U-Boot] [PATCH V2 09/12] power: pmic.h: include dm/ofnode.h Peng Fan
2017-08-28  6:29 ` [U-Boot] [PATCH V2 10/12] board: freescale: common: add pfuze dm code Peng Fan
2017-08-28 16:26   ` York Sun
2017-08-28  6:29 ` [U-Boot] [PATCH V2 11/12] imx: mx6sabresd: enable dm drivers Peng Fan
2017-08-28  6:29 ` [U-Boot] [PATCH V2 12/12] imx: mx6sabresd: update README Peng Fan
2017-08-28  7:32 ` [U-Boot] [PATCH V2 01/12] scripts: spl: fix typo Stefano Babic
2017-08-28  7:36   ` Peng Fan
2017-08-28  7:41     ` Stefano Babic

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=1503901744-21087-8-git-send-email-peng.fan@nxp.com \
    --to=peng.fan@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.