Patchwork [1/5] mtd: dataflash: Use of_match_ptr() macro

login
register
mail settings
Submitter Sachin Kamat
Date March 14, 2013, 10:07 a.m.
Message ID <1363255624-20885-1-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/227529/
State New
Headers show

Comments

Sachin Kamat - March 14, 2013, 10:07 a.m.
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/mtd/devices/mtd_dataflash.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Artem Bityutskiy - March 18, 2013, 7:30 a.m.
On Thu, 2013-03-14 at 15:37 +0530, Sachin Kamat wrote:
> This eliminates having an #ifdef returning NULL for the case
> when OF is disabled.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Pushed all to l2-mtd.git, thanks!

Patch

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,