All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>, Olof Johansson <olof@lixom.net>,
	Stephen Warren <swarren@nvidia.com>,
	linux-mmc@vger.kernel.org
Subject: [PATCH] mmc: sdhci-tegra: Add #ifdef CONFIG_OF guard for of_find_property
Date: Mon, 03 Oct 2011 12:07:32 +0800	[thread overview]
Message-ID: <1317614852.30838.1.camel@phoenix> (raw)

I got below build error with "make tegra_defconfig;make"
Add #ifdef CONFIG_OF guard for of_find_property to fix below build error:

  CC      drivers/mmc/host/sdhci-tegra.o
drivers/mmc/host/sdhci-tegra.c: In function 'sdhci_tegra_dt_parse_pdata':
drivers/mmc/host/sdhci-tegra.c:157: error: implicit declaration of function 'of_find_property'
make[3]: *** [drivers/mmc/host/sdhci-tegra.o] Error 1
make[2]: *** [drivers/mmc/host] Error 2
make[1]: *** [drivers/mmc] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
I got the build error on linux-next (20110930).
Axel

 drivers/mmc/host/sdhci-tegra.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 67176afc..3883602 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -154,8 +154,11 @@ static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata(
 	plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
 	plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
 	plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0);
+
+#ifdef CONFIG_OF
 	if (of_find_property(np, "support-8bit", NULL))
 		plat->is_8bit = 1;
+#endif
 
 	return plat;
 }
-- 
1.7.4.1




             reply	other threads:[~2011-10-03  4:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03  4:07 Axel Lin [this message]
2011-10-03  8:32 ` [PATCH] mmc: sdhci-tegra: Add #ifdef CONFIG_OF guard for of_find_property Igor Grinberg
2011-10-03 15:59   ` Stephen Warren
2011-10-03 15:59     ` Stephen Warren
2011-10-04 18:32     ` Grant Likely
2011-10-03 16:39 ` H Hartley Sweeten
2011-10-03 16:39   ` H Hartley Sweeten

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=1317614852.30838.1.camel@phoenix \
    --to=axel.lin@gmail.com \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=swarren@nvidia.com \
    /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.