[U-Boot] [PATCH 3/6] net: e1000: Move #include of common.h to the C files

Bin Meng bmeng.cn at gmail.com
Fri Jul 31 11:09:50 CEST 2015


On Fri, Jul 31, 2015 at 3:40 AM, Simon Glass <sjg at chromium.org> wrote:
> We cannot currently include any header files in the C files since common.h
> needs to be included first, and it is in the header file. Move it.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/net/e1000.c     | 1 +
>  drivers/net/e1000.h     | 1 -
>  drivers/net/e1000_spi.c | 1 +
>  3 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
> index 96e6bb0..e39515d 100644
> --- a/drivers/net/e1000.c
> +++ b/drivers/net/e1000.c
> @@ -29,6 +29,7 @@ tested on both gig copper and gig fiber boards
>   *  Copyright 2011 Freescale Semiconductor, Inc.
>   */
>
> +#include <common.h>
>  #include "e1000.h"
>
>  #define TOUT_LOOP   100000
> diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
> index f3b77b1..efe7814 100644
> --- a/drivers/net/e1000.h
> +++ b/drivers/net/e1000.h
> @@ -19,7 +19,6 @@
>  #ifndef _E1000_HW_H_
>  #define _E1000_HW_H_
>
> -#include <common.h>
>  #include <linux/list.h>
>  #include <malloc.h>
>  #include <net.h>
> diff --git a/drivers/net/e1000_spi.c b/drivers/net/e1000_spi.c
> index 93043a1..e7f6826 100644
> --- a/drivers/net/e1000_spi.c
> +++ b/drivers/net/e1000_spi.c
> @@ -1,3 +1,4 @@
> +#include <common.h>
>  #include "e1000.h"
>  #include <linux/compiler.h>
>
> --

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list