Skip to content

Commit 47a95fe

Browse files
thierryredinglinusw
authored andcommitted
gpio: of: Remove unneeded dummy function
of_find_gpio() is always called under an IS_ENABLED(CONFIG_OF), so the dummy implementation provided for !OF configurations is not needed. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 1333b90 commit 47a95fe

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/gpio/gpiolib.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,6 @@ void gpiod_add_lookup_table(struct gpiod_lookup_table *table)
25962596
mutex_unlock(&gpio_lookup_lock);
25972597
}
25982598

2599-
#ifdef CONFIG_OF
26002599
static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
26012600
unsigned int idx,
26022601
enum gpio_lookup_flags *flags)
@@ -2621,14 +2620,6 @@ static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
26212620

26222621
return desc;
26232622
}
2624-
#else
2625-
static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
2626-
unsigned int idx,
2627-
enum gpio_lookup_flags *flags)
2628-
{
2629-
return ERR_PTR(-ENODEV);
2630-
}
2631-
#endif
26322623

26332624
static struct gpio_desc *acpi_find_gpio(struct device *dev, const char *con_id,
26342625
unsigned int idx,

0 commit comments

Comments
 (0)