diff mbox series

[1/1] dm: pinctrl: include linux/errno.h in pinctrl.h

Message ID 20200217131434.5777-1-sebastien.szymanski@armadeus.com
State New
Headers show
Series [1/1] dm: pinctrl: include linux/errno.h in pinctrl.h | expand

Commit Message

Sébastien Szymanski Feb. 17, 2020, 1:14 p.m. UTC
Otherwise the compilation fails with PINCTRL_GENERIC=n :

In file included from drivers/pinctrl/nxp/pinctrl-imx8m.c:7:0:
include/dm/pinctrl.h: In function ?pinctrl_generic_set_state?:
include/dm/pinctrl.h:319:10: error: ?EINVAL? undeclared (first use in this function)
  return -EINVAL;
          ^~~~~~
include/dm/pinctrl.h:319:10: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: S?bastien Szymanski <sebastien.szymanski at armadeus.com>
---
 include/dm/pinctrl.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Feb. 18, 2020, 6:31 p.m. UTC | #1
On Mon, 17 Feb 2020 at 06:14, S?bastien Szymanski
<sebastien.szymanski at armadeus.com> wrote:
>
> Otherwise the compilation fails with PINCTRL_GENERIC=n :
>
> In file included from drivers/pinctrl/nxp/pinctrl-imx8m.c:7:0:
> include/dm/pinctrl.h: In function ?pinctrl_generic_set_state?:
> include/dm/pinctrl.h:319:10: error: ?EINVAL? undeclared (first use in this function)
>   return -EINVAL;
>           ^~~~~~
> include/dm/pinctrl.h:319:10: note: each undeclared identifier is reported only once for each function it appears in
>
> Signed-off-by: S?bastien Szymanski <sebastien.szymanski at armadeus.com>
> ---
>  include/dm/pinctrl.h | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg at chromium.org>
diff mbox series

Patch

diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index 692e5fc8cb..2012bb941e 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -6,6 +6,8 @@ 
 #ifndef __PINCTRL_H
 #define __PINCTRL_H
 
+#include <linux/errno.h>
+
 #define PINNAME_SIZE	10
 #define PINMUX_SIZE	40