diff options
author | Tom Rini <trini@konsulko.com> | 2020-06-04 16:01:39 -0400 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2020-06-16 17:00:02 +0530 |
commit | a37f765219870e4cb4ed9590dff77ed8a380a462 (patch) | |
tree | c1fda9d5dd4c78cee5cc2dfb5efb624508b60c7c /drivers/gpio/omap_gpio.c | |
parent | f18f823c130cbfeb3124c1d62baad857fc0e8d77 (diff) |
gpio: omap_gpio: Fix unused function warning in non-DM case
In the case of non-DM_GPIO the function get_gpio_index() will never be
called, and clang will warn about this. Move this to be with the other
non-DM code for easier removal later.
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'drivers/gpio/omap_gpio.c')
-rw-r--r-- | drivers/gpio/omap_gpio.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 4249850f4b..c986ef0380 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -41,11 +41,6 @@ struct gpio_bank { #endif -static inline int get_gpio_index(int gpio) -{ - return gpio & 0x1f; -} - int gpio_is_valid(int gpio) { return (gpio >= 0) && (gpio < OMAP_MAX_GPIO); @@ -122,6 +117,10 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio) } #if !CONFIG_IS_ENABLED(DM_GPIO) +static inline int get_gpio_index(int gpio) +{ + return gpio & 0x1f; +} static inline const struct gpio_bank *get_gpio_bank(int gpio) { |