diff mbox series

[U-Boot,v6,06/31] mtd: fix build issue with includes

Message ID 20180816153029.15521-7-miquel.raynal@bootlin.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series SPI-NAND support | expand

Commit Message

Miquel Raynal Aug. 16, 2018, 3:30 p.m. UTC
Fix build errors produced by mtd.h and dm/device.h if not included in
the right order.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
---
 include/linux/mtd/mtd.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Boris Brezillon Aug. 16, 2018, 3:33 p.m. UTC | #1
On Thu, 16 Aug 2018 17:30:04 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Fix build errors produced by mtd.h and dm/device.h if not included in
> the right order.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Reviewed-by: Jagan Teki <jagan@openedev.com>

I'm pretty sure this patch is not needed, the build failure has been
fixed in patch 5.

> ---
>  include/linux/mtd/mtd.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> index 73b19b57b1..272c646f9d 100644
> --- a/include/linux/mtd/mtd.h
> +++ b/include/linux/mtd/mtd.h
> @@ -21,6 +21,9 @@
>  #include <mtd/mtd-abi.h>
>  #include <linux/errno.h>
>  #include <div64.h>
> +#if IS_ENABLED(CONFIG_DM)
> +#include <dm/device.h>
> +#endif
>  
>  #define MAX_MTD_DEVICES 32
>  #endif
Boris Brezillon Aug. 16, 2018, 3:55 p.m. UTC | #2
On Thu, 16 Aug 2018 17:33:18 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> On Thu, 16 Aug 2018 17:30:04 +0200
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> 
> > Fix build errors produced by mtd.h and dm/device.h if not included in
> > the right order.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > Reviewed-by: Jagan Teki <jagan@openedev.com>  
> 
> I'm pretty sure this patch is not needed, the build failure has been
> fixed in patch 5.

My bad. It's needed, but it should be squashed in patch 5, since this
is patch 5 who introduces the error.

> 
> > ---
> >  include/linux/mtd/mtd.h | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> > index 73b19b57b1..272c646f9d 100644
> > --- a/include/linux/mtd/mtd.h
> > +++ b/include/linux/mtd/mtd.h
> > @@ -21,6 +21,9 @@
> >  #include <mtd/mtd-abi.h>
> >  #include <linux/errno.h>
> >  #include <div64.h>
> > +#if IS_ENABLED(CONFIG_DM)
> > +#include <dm/device.h>
> > +#endif
> >  
> >  #define MAX_MTD_DEVICES 32
> >  #endif  
>
diff mbox series

Patch

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 73b19b57b1..272c646f9d 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -21,6 +21,9 @@ 
 #include <mtd/mtd-abi.h>
 #include <linux/errno.h>
 #include <div64.h>
+#if IS_ENABLED(CONFIG_DM)
+#include <dm/device.h>
+#endif
 
 #define MAX_MTD_DEVICES 32
 #endif