diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-14 06:07:01 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:19:56 -0400 |
commit | c4f8cde8343ace075fb3dae2d5bc796cdfaffbfd (patch) | |
tree | f4787f9ba1ff797aca41aacb3dcb945822b6a17a /drivers/mtd | |
parent | 19d69b86007e6ede34c08f0b5635d1aaba6a46b7 (diff) |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/davinci_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 864717b9bb95..c3e15a558173 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/of_device.h> | 36 | #include <linux/of_device.h> |
37 | #include <linux/of.h> | ||
37 | 38 | ||
38 | #include <linux/platform_data/mtd-davinci.h> | 39 | #include <linux/platform_data/mtd-davinci.h> |
39 | #include <linux/platform_data/mtd-davinci-aemif.h> | 40 | #include <linux/platform_data/mtd-davinci-aemif.h> |
@@ -577,7 +578,6 @@ static struct davinci_nand_pdata | |||
577 | return pdev->dev.platform_data; | 578 | return pdev->dev.platform_data; |
578 | } | 579 | } |
579 | #else | 580 | #else |
580 | #define davinci_nand_of_match NULL | ||
581 | static struct davinci_nand_pdata | 581 | static struct davinci_nand_pdata |
582 | *nand_davinci_get_pdata(struct platform_device *pdev) | 582 | *nand_davinci_get_pdata(struct platform_device *pdev) |
583 | { | 583 | { |
@@ -878,7 +878,7 @@ static struct platform_driver nand_davinci_driver = { | |||
878 | .driver = { | 878 | .driver = { |
879 | .name = "davinci_nand", | 879 | .name = "davinci_nand", |
880 | .owner = THIS_MODULE, | 880 | .owner = THIS_MODULE, |
881 | .of_match_table = davinci_nand_of_match, | 881 | .of_match_table = of_match_ptr(davinci_nand_of_match), |
882 | }, | 882 | }, |
883 | }; | 883 | }; |
884 | MODULE_ALIAS("platform:davinci_nand"); | 884 | MODULE_ALIAS("platform:davinci_nand"); |