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>
This commit is contained in:
parent
19d69b8600
commit
c4f8cde834
1 changed files with 2 additions and 2 deletions
|
@ -34,6 +34,7 @@
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
|
||||||
#include <linux/platform_data/mtd-davinci.h>
|
#include <linux/platform_data/mtd-davinci.h>
|
||||||
#include <linux/platform_data/mtd-davinci-aemif.h>
|
#include <linux/platform_data/mtd-davinci-aemif.h>
|
||||||
|
@ -577,7 +578,6 @@ static struct davinci_nand_pdata
|
||||||
return pdev->dev.platform_data;
|
return pdev->dev.platform_data;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define davinci_nand_of_match NULL
|
|
||||||
static struct davinci_nand_pdata
|
static struct davinci_nand_pdata
|
||||||
*nand_davinci_get_pdata(struct platform_device *pdev)
|
*nand_davinci_get_pdata(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
@ -878,7 +878,7 @@ static struct platform_driver nand_davinci_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "davinci_nand",
|
.name = "davinci_nand",
|
||||||
.owner = THIS_MODULE,
|
.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");
|
MODULE_ALIAS("platform:davinci_nand");
|
||||||
|
|
Loading…
Add table
Reference in a new issue