Skip to content

Commit b57d43f

Browse files
Sachin KamatDavid Woodhouse
authored andcommitted
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>
1 parent b60c724 commit b57d43f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/mtd/nand/gpio.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ static struct resource *gpio_nand_get_io_sync_of(struct platform_device *pdev)
190190
return r;
191191
}
192192
#else /* CONFIG_OF */
193-
#define gpio_nand_id_table NULL
194193
static inline int gpio_nand_get_config_of(const struct device *dev,
195194
struct gpio_nand_platdata *plat)
196195
{
@@ -418,7 +417,7 @@ static struct platform_driver gpio_nand_driver = {
418417
.remove = gpio_nand_remove,
419418
.driver = {
420419
.name = "gpio-nand",
421-
.of_match_table = gpio_nand_id_table,
420+
.of_match_table = of_match_ptr(gpio_nand_id_table),
422421
},
423422
};
424423

0 commit comments

Comments
 (0)