mtd: dataflash: Use of_match_ptr() macro
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Apr 5 08:59:12 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=19d69b86007e6ede34c08f0b5635d1aaba6a46b7
Commit: 19d69b86007e6ede34c08f0b5635d1aaba6a46b7
Parent: dcf8abfcb0816adfb9bb175cbea00d7a1a2cae69
Author: Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Thu Mar 14 15:37:00 2013 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 13:19:51 2013 +0100
mtd: dataflash: Use of_match_ptr() macro
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.
Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/mtd_dataflash.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 945c9f76..28779b6 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -105,8 +105,6 @@ static const struct of_device_id dataflash_dt_ids[] = {
{ .compatible = "atmel,dataflash", },
{ /* sentinel */ }
};
-#else
-#define dataflash_dt_ids NULL
#endif
/* ......................................................................... */
@@ -914,7 +912,7 @@ static struct spi_driver dataflash_driver = {
.driver = {
.name = "mtd_dataflash",
.owner = THIS_MODULE,
- .of_match_table = dataflash_dt_ids,
+ .of_match_table = of_match_ptr(dataflash_dt_ids),
},
.probe = dataflash_probe,
More information about the linux-mtd-cvs
mailing list