From: Josh Wu Date: Wed, 7 Aug 2013 03:36:09 +0000 (+0800) Subject: mtd: atmel_nand: fix the warning when CONFIG_OF is not defined X-Git-Tag: next-20130822~69^2~63 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=816462dc4141156607157dbc998cc7ab977f3c96;p=karo-tx-linux.git 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 kernel is configurated as non-dt supported. Signed-off-by: Josh Wu Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 65b302cf9f8a..ddcd575b2823 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 = {