linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: atmel_nand: fix the warning when CONFIG_OF is not defined
@ 2013-08-07  3:36 Josh Wu
  2013-08-07  6:30 ` Artem Bityutskiy
  2013-08-30 20:23 ` David Woodhouse
  0 siblings, 2 replies; 7+ messages in thread
From: Josh Wu @ 2013-08-07  3:36 UTC (permalink / raw)
  To: linux-arm-kernel

This patch fix following warning:

drivers/mtd/nand/atmel_nand.c:2007: warning: 'atmel_nand_nfc_match' defined but not used

This patch add '#if defined(CONFIG_OF)' block to guard around the definition of
atmel_nand_nfc_match, in order to avoid the warning when kernel is configurated
as non-dt supported.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
 drivers/mtd/nand/atmel_nand.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 65b302c..ddcd575 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -2251,10 +2251,12 @@ static int atmel_nand_nfc_probe(struct platform_device *pdev)
 	return 0;
 }
 
+#if defined(CONFIG_OF)
 static struct of_device_id atmel_nand_nfc_match[] = {
 	{ .compatible = "atmel,sama5d3-nfc" },
 	{ /* sentinel */ }
 };
+#endif
 
 static struct platform_driver atmel_nand_nfc_driver = {
 	.driver = {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-03  3:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07  3:36 [PATCH] mtd: atmel_nand: fix the warning when CONFIG_OF is not defined Josh Wu
2013-08-07  6:30 ` Artem Bityutskiy
2013-08-30 20:23 ` David Woodhouse
2013-08-31 17:04   ` Ezequiel Garcia
2013-09-02  7:02     ` Josh Wu
2013-09-02 17:13       ` Ezequiel Garcia
2013-09-03  3:57         ` Josh Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).