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>
#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);
}
#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)
{