Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1392130 > unrolled thread

[PATCH] of: include errno.h in of_graph.h

Started byArnd Bergmann <arnd@arndb.de>
First post2016-05-02 13:10 +0200
Last post2016-05-02 16:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] of: include errno.h in of_graph.h Arnd Bergmann <arnd@arndb.de> - 2016-05-02 13:10 +0200
    Re: [PATCH] of: include errno.h in of_graph.h Rob Herring <robh@kernel.org> - 2016-05-02 16:10 +0200

#1392130 — [PATCH] of: include errno.h in of_graph.h

FromArnd Bergmann <arnd@arndb.de>
Date2016-05-02 13:10 +0200
Subject[PATCH] of: include errno.h in of_graph.h
Message-ID<rujTI-2ar-15@gated-at.bofh.it>
When CONFIG_OF is disabled, we have to include linux/errno.h before
including of_graph.h, or get build errors like in the newly added
sun4i drm driver:

In file included from ../drivers/gpu/drm/sun4i/sun4i_drv.c:14:0:
include/linux/of_graph.h: In function 'of_graph_parse_endpoint':
include/linux/of_graph.h:58:10: error: 'ENOSYS' undeclared (first use in this function)

A better solution is to ensure that the header can be included
by itself, so let's include linux/errno.h here to fix the error
we just got, and any similar future error.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
---
 include/linux/of_graph.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
index f8bcd0e21a26..bb3a5a2cd570 100644
--- a/include/linux/of_graph.h
+++ b/include/linux/of_graph.h
@@ -15,6 +15,7 @@
 #define __LINUX_OF_GRAPH_H
 
 #include <linux/types.h>
+#include <linux/errno.h>
 
 /**
  * struct of_endpoint - the OF graph endpoint data structure
-- 
2.7.0

[toc] | [next] | [standalone]


#1392229

FromRob Herring <robh@kernel.org>
Date2016-05-02 16:10 +0200
Message-ID<rumHU-4HQ-15@gated-at.bofh.it>
In reply to#1392130
On Mon, May 02, 2016 at 12:59:19PM +0200, Arnd Bergmann wrote:
> When CONFIG_OF is disabled, we have to include linux/errno.h before
> including of_graph.h, or get build errors like in the newly added
> sun4i drm driver:
> 
> In file included from ../drivers/gpu/drm/sun4i/sun4i_drv.c:14:0:
> include/linux/of_graph.h: In function 'of_graph_parse_endpoint':
> include/linux/of_graph.h:58:10: error: 'ENOSYS' undeclared (first use in this function)
> 
> A better solution is to ensure that the header can be included
> by itself, so let's include linux/errno.h here to fix the error
> we just got, and any similar future error.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")
> ---
>  include/linux/of_graph.h | 1 +
>  1 file changed, 1 insertion(+)

Applied.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web