Skip to content

Commit

Permalink
mmc: mtk-sd: fix configuration option check
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Fabo authored and trini committed Apr 23, 2019
1 parent a933266 commit b5096f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/mmc/mtk-sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b5096f1

Please sign in to comment.