From 4eb293487d05a69862a4907ee944aa271ed49a4c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 13 Jun 2019 10:55:32 +0900 Subject: pinctrl: make pinconf.h self-contained This header uses 'bool', but it does not include any header by itself. So, it could cause unknown type name error, depending on the header include order, although probably has been included by someone else. Include to make it self-contained. Signed-off-by: Masahiro Yamada Signed-off-by: Linus Walleij --- include/linux/pinctrl/pinconf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/pinctrl/pinconf.h') diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index 93c9dd133e9d..9bebc3554809 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h @@ -14,6 +14,8 @@ #ifdef CONFIG_PINCONF +#include + struct pinctrl_dev; struct seq_file; -- cgit v1.2.3 From ec6516bfbaf72e7c81811162b6de96322e32a027 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 13 Jun 2019 10:55:31 +0900 Subject: 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 Signed-off-by: Linus Walleij --- include/linux/pinctrl/pinconf.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/linux/pinctrl/pinconf.h') diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index 9bebc3554809..513883dcc5a9 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h @@ -12,8 +12,6 @@ #ifndef __LINUX_PINCTRL_PINCONF_H #define __LINUX_PINCTRL_PINCONF_H -#ifdef CONFIG_PINCONF - #include struct pinctrl_dev; @@ -67,6 +65,4 @@ struct pinconf_ops { unsigned long config); }; -#endif - #endif /* __LINUX_PINCTRL_PINCONF_H */ -- cgit v1.2.3