Patchwork [4/5] mtd: gpio: Use of_match_ptr() macro

login
register
mail settings
Submitter Sachin Kamat
Date March 14, 2013, 10:07 a.m.
Message ID <1363255624-20885-4-git-send-email-sachin.kamat@linaro.org>
Download mbox | patch
Permalink /patch/227532/
State Accepted
Commit b57d43ff64b036f43940e25d153518bee6cbc7ec
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/nand/gpio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
index 0cc1394..89065dd 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/gpio.c
@@ -190,7 +190,6 @@  static struct resource *gpio_nand_get_io_sync_of(struct platform_device *pdev)
 	return r;
 }
 #else /* CONFIG_OF */
-#define gpio_nand_id_table NULL
 static inline int gpio_nand_get_config_of(const struct device *dev,
 					  struct gpio_nand_platdata *plat)
 {
@@ -418,7 +417,7 @@  static struct platform_driver gpio_nand_driver = {
 	.remove		= gpio_nand_remove,
 	.driver		= {
 		.name	= "gpio-nand",
-		.of_match_table = gpio_nand_id_table,
+		.of_match_table = of_match_ptr(gpio_nand_id_table),
 	},
 };