mtd: atmel_nand: fix the warning when CONFIG_OF is not defined
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:02 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9fe5f52c9eb2f2df2b6ffdab0100f4475fef2ba1
Commit: 9fe5f52c9eb2f2df2b6ffdab0100f4475fef2ba1
Parent: 561775169ce289850670fdb4a7353b67a7095bfa
Author: Josh Wu <josh.wu at atmel.com>
AuthorDate: Wed Aug 7 11:36:09 2013 +0800
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:34:27 2013 +0100
mtd: atmel_nand: fix the warning when CONFIG_OF is not defined
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 the kernel is
configured without DT support.
Signed-off-by: Josh Wu <josh.wu at atmel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.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 = {
More information about the linux-mtd-cvs
mailing list