pinctrl: sp7021: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Thu, 15 Dec 2022 16:38:10 +0000 (17:38 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 29 Dec 2022 01:07:25 +0000 (02:07 +0100)
commit5626af8fc4322a972b59c7b1a6760767f7b58d4f
tree52144cb3f029007fcca806857efadabf0a896278
parent1b929c02afd37871d5afb9d498426f83432e71c2
pinctrl: sp7021: fix unused function warning

sppctl_gpio_inv_get is only used from the debugfs code inside
of an #ifdef, so we get a warning without that:

drivers/pinctrl/sunplus/sppctl.c:393:12: error: 'sppctl_gpio_inv_get' defined but not used [-Werror=unused-function]
  393 | static int sppctl_gpio_inv_get(struct gpio_chip *chip, unsigned int offset)
      |            ^~~~~~~~~~~~~~~~~~~

Replace the #ifdef with an IS_ENABLED() check that avoids the warning.

Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20221215163822.542622-1-arnd@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunplus/sppctl.c