Skip to content

Commit

Permalink
mtd: gpio: Use of_match_ptr() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and David Woodhouse committed Apr 5, 2013
1 parent b60c724 commit b57d43f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/nand/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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),
},
};

Expand Down

0 comments on commit b57d43f

Please sign in to comment.