mtd: davinci_nand: Use of_match_ptr()
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=c4f8cde8343ace075fb3dae2d5bc796cdfaffbfd
Commit: c4f8cde8343ace075fb3dae2d5bc796cdfaffbfd
Parent: 19d69b86007e6ede34c08f0b5635d1aaba6a46b7
Author: Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Thu Mar 14 15:37:01 2013 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 13:19:56 2013 +0100
mtd: davinci_nand: Use of_match_ptr()
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/nand/davinci_nand.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 864717b..c3e15a5 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -34,6 +34,7 @@
#include <linux/mtd/partitions.h>
#include <linux/slab.h>
#include <linux/of_device.h>
+#include <linux/of.h>
#include <linux/platform_data/mtd-davinci.h>
#include <linux/platform_data/mtd-davinci-aemif.h>
@@ -577,7 +578,6 @@ static struct davinci_nand_pdata
return pdev->dev.platform_data;
}
#else
-#define davinci_nand_of_match NULL
static struct davinci_nand_pdata
*nand_davinci_get_pdata(struct platform_device *pdev)
{
@@ -878,7 +878,7 @@ static struct platform_driver nand_davinci_driver = {
.driver = {
.name = "davinci_nand",
.owner = THIS_MODULE,
- .of_match_table = davinci_nand_of_match,
+ .of_match_table = of_match_ptr(davinci_nand_of_match),
},
};
MODULE_ALIAS("platform:davinci_nand");
More information about the linux-mtd-cvs
mailing list