summaryrefslogtreecommitdiff
path: root/include/linux/pinctrl/pinconf-generic.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-06-13 04:55:31 +0300
committerLinus Walleij <linus.walleij@linaro.org>2019-06-25 11:49:18 +0300
commitec6516bfbaf72e7c81811162b6de96322e32a027 (patch)
treeb09f9ad73cc42c90e6c43504381b69751182abdd /include/linux/pinctrl/pinconf-generic.h
parentd9c238c5a6aeee2706d5ace0b1aa005e6d1a482f (diff)
downloadlinux-ec6516bfbaf72e7c81811162b6de96322e32a027.tar.xz
pinctrl: remove unneeded #ifdef around declarations
What is the point in surrounding the whole of declarations with ifdef like this? #ifdef CONFIG_FOO int foo(void); #endif If CONFIG_FOO is not defined, all callers of foo() will fail with implicit declaration errors since the top Makefile adds -Werror-implicit-function-declaration to KBUILD_CFLAGS. This breaks the build earlier when you are doing something wrong. That's it. Anyway, it will fail to link since the definition of foo() is not compiled. In summary, these ifdef are unneeded. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/pinctrl/pinconf-generic.h')
-rw-r--r--include/linux/pinctrl/pinconf-generic.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 72d06d6a3099..673828a52294 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -12,6 +12,12 @@
#ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
#define __LINUX_PINCTRL_PINCONF_GENERIC_H
+#include <linux/device.h>
+#include <linux/pinctrl/machine.h>
+
+struct pinctrl_dev;
+struct pinctrl_map;
+
/**
* enum pin_config_param - possible pin configuration parameters
* @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it
@@ -159,9 +165,6 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param
return PIN_CONF_PACKED(param, argument);
}
-#ifdef CONFIG_GENERIC_PINCONF
-
-#ifdef CONFIG_DEBUG_FS
#define PCONFDUMP(a, b, c, d) { \
.param = a, .display = b, .format = c, .has_arg = d \
}
@@ -172,14 +175,6 @@ struct pin_config_item {
const char * const format;
bool has_arg;
};
-#endif /* CONFIG_DEBUG_FS */
-
-#ifdef CONFIG_OF
-
-#include <linux/device.h>
-#include <linux/pinctrl/machine.h>
-struct pinctrl_dev;
-struct pinctrl_map;
struct pinconf_generic_params {
const char * const property;
@@ -224,8 +219,5 @@ static inline int pinconf_generic_dt_node_to_map_all(
return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
PIN_MAP_TYPE_INVALID);
}
-#endif
-
-#endif /* CONFIG_GENERIC_PINCONF */
#endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */