[PATCH] pinctrl: remove unnecessary error check
Masahiro Yamada
yamada.m at jp.panasonic.com
Sat Jan 31 18:58:26 PST 2015
The file drivers/pinctrl/pinctrl.c is compiled only when
CONFIG_PINCTRL is defined. "IS_ENABLED(CONFIG_PINCTRL)" is
always evaluated as 1 in this function.
(Although the compiler would optimize it, the source file does
not look nice.)
Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---
drivers/pinctrl/pinctrl.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl.c b/drivers/pinctrl/pinctrl.c
index d6479b9..10ce186 100644
--- a/drivers/pinctrl/pinctrl.c
+++ b/drivers/pinctrl/pinctrl.c
@@ -62,9 +62,6 @@ int of_pinctrl_select_state(struct device_node *np, const char *name)
struct device_node *np_config;
const char *statename;
- if (!IS_ENABLED(CONFIG_PINCTRL))
- return -ENOSYS;
-
if (!of_find_property(np, "pinctrl-0", NULL))
return 0;
--
1.9.1
More information about the barebox
mailing list