diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-01-28 17:08:44 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-01-30 14:30:59 +0100 |
commit | 4f06266a62446afc07c6b7e64edc55ea13852bce (patch) | |
tree | 248fd817602675831df40de7000b946671dfd20c /drivers/pinctrl/pinctrl-zynq.c | |
parent | pinctrl: rockchip: Only mask interrupts; never disable (diff) | |
download | linux-4f06266a62446afc07c6b7e64edc55ea13852bce.tar.xz linux-4f06266a62446afc07c6b7e64edc55ea13852bce.zip |
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-zynq.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-zynq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c index 6480ed533a87..22280bddb9e2 100644 --- a/drivers/pinctrl/pinctrl-zynq.c +++ b/drivers/pinctrl/pinctrl-zynq.c @@ -924,9 +924,11 @@ static const struct pinconf_generic_params zynq_dt_params[] = { {"io-standard", PIN_CONFIG_IOSTANDARD, zynq_iostd_lvcmos18}, }; +#ifdef CONFIG_DEBUG_FS static const struct pin_config_item zynq_conf_items[ARRAY_SIZE(zynq_dt_params)] = { PCONFDUMP(PIN_CONFIG_IOSTANDARD, "IO-standard", NULL, true), }; +#endif static unsigned int zynq_pinconf_iostd_get(u32 reg) { @@ -1101,7 +1103,9 @@ static struct pinctrl_desc zynq_desc = { .confops = &zynq_pinconf_ops, .num_custom_params = ARRAY_SIZE(zynq_dt_params), .custom_params = zynq_dt_params, +#ifdef CONFIG_DEBUG_FS .custom_conf_items = zynq_conf_items, +#endif .owner = THIS_MODULE, }; |