diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-03-14 06:07:03 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:20:09 -0400 |
commit | b57d43ff64b036f43940e25d153518bee6cbc7ec (patch) | |
tree | 9c1f880942457586863cbcde7b9c3d23b52ffa09 /drivers/mtd | |
parent | b60c7243863fd2a5059d2c3137ed31b797cd7848 (diff) |
mtd: gpio: Use of_match_ptr() macro
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/gpio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index 0cc1394cbeb0..89065dd83d64 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) | |||
190 | return r; | 190 | return r; |
191 | } | 191 | } |
192 | #else /* CONFIG_OF */ | 192 | #else /* CONFIG_OF */ |
193 | #define gpio_nand_id_table NULL | ||
194 | static inline int gpio_nand_get_config_of(const struct device *dev, | 193 | static inline int gpio_nand_get_config_of(const struct device *dev, |
195 | struct gpio_nand_platdata *plat) | 194 | struct gpio_nand_platdata *plat) |
196 | { | 195 | { |
@@ -418,7 +417,7 @@ static struct platform_driver gpio_nand_driver = { | |||
418 | .remove = gpio_nand_remove, | 417 | .remove = gpio_nand_remove, |
419 | .driver = { | 418 | .driver = { |
420 | .name = "gpio-nand", | 419 | .name = "gpio-nand", |
421 | .of_match_table = gpio_nand_id_table, | 420 | .of_match_table = of_match_ptr(gpio_nand_id_table), |
422 | }, | 421 | }, |
423 | }; | 422 | }; |
424 | 423 | ||