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>
This commit is contained in:

committed by
Linus Walleij

parent
d9c238c5a6
commit
ec6516bfba
@@ -12,8 +12,6 @@
|
||||
#ifndef __LINUX_PINCTRL_PINCTRL_H
|
||||
#define __LINUX_PINCTRL_PINCTRL_H
|
||||
|
||||
#ifdef CONFIG_PINCTRL
|
||||
|
||||
#include <linux/radix-tree.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -203,6 +201,4 @@ extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
|
||||
extern const char *pinctrl_dev_get_devname(struct pinctrl_dev *pctldev);
|
||||
extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
|
||||
|
||||
#endif /* !CONFIG_PINCTRL */
|
||||
|
||||
#endif /* __LINUX_PINCTRL_PINCTRL_H */
|
||||
|
Reference in New Issue
Block a user