Skip to content

Commit c4f8cde

Browse files
Sachin KamatDavid Woodhouse
authored andcommitted
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@linaro.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1 parent 19d69b8 commit c4f8cde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/mtd/nand/davinci_nand.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/mtd/partitions.h>
3535
#include <linux/slab.h>
3636
#include <linux/of_device.h>
37+
#include <linux/of.h>
3738

3839
#include <linux/platform_data/mtd-davinci.h>
3940
#include <linux/platform_data/mtd-davinci-aemif.h>
@@ -577,7 +578,6 @@ static struct davinci_nand_pdata
577578
return pdev->dev.platform_data;
578579
}
579580
#else
580-
#define davinci_nand_of_match NULL
581581
static struct davinci_nand_pdata
582582
*nand_davinci_get_pdata(struct platform_device *pdev)
583583
{
@@ -878,7 +878,7 @@ static struct platform_driver nand_davinci_driver = {
878878
.driver = {
879879
.name = "davinci_nand",
880880
.owner = THIS_MODULE,
881-
.of_match_table = davinci_nand_of_match,
881+
.of_match_table = of_match_ptr(davinci_nand_of_match),
882882
},
883883
};
884884
MODULE_ALIAS("platform:davinci_nand");

0 commit comments

Comments
 (0)