[PATCH] staging/board/board.c: Fix compiler error of_find_all_nodes()

Dan Carpenter dan.carpenter at oracle.com
Wed Mar 6 07:43:09 UTC 2019


Change the subsystem prefix to: [PATCH] Staging: board: ...

On Tue, Mar 05, 2019 at 11:39:30PM +0000, Arnold J Chand wrote:
> Fix implicit-function-declaration error by 'extern'-ing the function in
> the file
> 
> Signed-off-by: Arnold Chand <chand.arnold at hotmail.com>
> ---
>  drivers/staging/board/board.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
> index cb6feb34dd40..3025ee9f5517 100644
> --- a/drivers/staging/board/board.c
> +++ b/drivers/staging/board/board.c
> @@ -22,6 +22,8 @@
>  static struct device_node *irqc_node __initdata;
>  static unsigned int irqc_base __initdata;
>  
> +extern struct device_node *of_find_all_nodes(struct device_node *prev);
> +

We already include <linux/of.h> so what's going on here?  The driver
compiles for me.  Anyway, fix the includes, don't do this.

regards,
dan carpenter



More information about the devel mailing list