]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: gpio: Use of_match_ptr() macro
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 14 Mar 2013 10:07:03 +0000 (15:37 +0530)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Apr 2013 12:20:09 +0000 (13:20 +0100)
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>
drivers/mtd/nand/gpio.c

index 0cc1394cbeb06669564994bd59d6bcd42e390c4b..89065dd83d64d7ad64a6d83ca318f36ae65ec6cf 100644 (file)
@@ -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),
        },
 };