pinctrl: hide PCONFDUMP in #ifdef
authorArnd Bergmann <arnd@arndb.de>
Wed, 28 Jan 2015 16:08:44 +0000 (17:08 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 30 Jan 2015 13:30:59 +0000 (14:30 +0100)
commit4f06266a62446afc07c6b7e64edc55ea13852bce
tree248fd817602675831df40de7000b946671dfd20c
parent5ae0c7ad06f4386d253ff2120ea769f01292f37b
pinctrl: hide PCONFDUMP in #ifdef

The zynq and qcom-spmi pinctrl drivers both use pin_config_item arrays
to provide extra interfaces in debugfs. This structure and the
PCONFDUMP macro are not defined if CONFIG_DEBUG_FS is turned off,
so we get build errors like:

pinctrl/qcom/pinctrl-spmi-gpio.c:139:37: error: array type has incomplete element type
 static const struct pin_config_item pmic_conf_items[ARRAY_SIZE(pmic_gpio_bindings)] = {
                                     ^
pinctrl/qcom/pinctrl-spmi-gpio.c:140:2: error: implicit declaration of function 'PCONFDUMP' [-Werror=implicit-function-declaration]
  PCONFDUMP(PMIC_GPIO_CONF_PULL_UP,  "pull up strength", NULL, true),
  ^
pinctrl/qcom/pinctrl-spmi-gpio.c:139:37: warning: 'pmic_conf_items' defined but not used [-Wunused-variable]
 static const struct pin_config_item pmic_conf_items[ARRAY_SIZE(pmic_gpio_bindings)] = {

Lacking any better idea to solve this nicely, this patch uses #ifdef
to hide the structures, just like the pinctrl core does.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-zynq.c
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c