linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] coda: Fix build due to iram.h rename
@ 2012-11-14 13:04 Fabio Estevam
  2012-12-17  9:37 ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2012-11-14 13:04 UTC (permalink / raw)
  To: mchehab
  Cc: kernel, p.zabel, javier.martin, linux-media, linux-kernel, Fabio Estevam

commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
location of iram.h, which causes the following build error when building the coda
driver:

drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
drivers/media/platform/coda.c: In function 'coda_probe':
drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
drivers/media/platform/coda.c: In function 'coda_remove':
drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free

Since the content of iram.h is not imx specific, move it to include/linux/iram.h
instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/mach-imx/iram_alloc.c              |    3 +--
 drivers/media/platform/coda.c               |    2 +-
 {arch/arm/mach-imx => include/linux}/iram.h |    0
 3 files changed, 2 insertions(+), 3 deletions(-)
 rename {arch/arm/mach-imx => include/linux}/iram.h (100%)

diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
index 6c80424..11e067f 100644
--- a/arch/arm/mach-imx/iram_alloc.c
+++ b/arch/arm/mach-imx/iram_alloc.c
@@ -22,8 +22,7 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/genalloc.h>
-
-#include "iram.h"
+#include <linux/iram.h>
 
 static unsigned long iram_phys_base;
 static void __iomem *iram_virt_base;
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index cd04ae2..5c66162 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -23,8 +23,8 @@
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 #include <linux/of.h>
+#include <linux/iram.h>
 
-#include <mach/iram.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
diff --git a/arch/arm/mach-imx/iram.h b/include/linux/iram.h
similarity index 100%
rename from arch/arm/mach-imx/iram.h
rename to include/linux/iram.h
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2012-11-14 13:04 [PATCH] [media] coda: Fix build due to iram.h rename Fabio Estevam
@ 2012-12-17  9:37 ` Sascha Hauer
  2012-12-27 22:15   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2012-12-17  9:37 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: mchehab, kernel, p.zabel, javier.martin, linux-media, linux-kernel

On Wed, Nov 14, 2012 at 11:04:42AM -0200, Fabio Estevam wrote:
> commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> location of iram.h, which causes the following build error when building the coda
> driver:
> 
> drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> drivers/media/platform/coda.c: In function 'coda_probe':
> drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> drivers/media/platform/coda.c: In function 'coda_remove':
> drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free
> 
> Since the content of iram.h is not imx specific, move it to include/linux/iram.h
> instead.

Generally we need a fix for this, but:

> diff --git a/arch/arm/mach-imx/iram.h b/include/linux/iram.h
> similarity index 100%
> rename from arch/arm/mach-imx/iram.h
> rename to include/linux/iram.h

We shouldn't introduce a file include/linux/iram.h which is purely i.MX
specific. The name is far too generic. I would rather suggest
include/linux/platform_data/imx-iram.h (Although it's not exactly
platform_data, so I'm open for better suggestions).

As a side note this i.MX specific iram stuff (hopefully) is obsolete
after the next merge window as Philip already has patches for a generic
iram allocator which didn't make it into this merge window.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2012-12-17  9:37 ` Sascha Hauer
@ 2012-12-27 22:15   ` Mauro Carvalho Chehab
  2013-01-02 11:29     ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2012-12-27 22:15 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Fabio Estevam, kernel, p.zabel, javier.martin, linux-media, linux-kernel

Em Mon, 17 Dec 2012 10:37:14 +0100
Sascha Hauer <s.hauer@pengutronix.de> escreveu:

> On Wed, Nov 14, 2012 at 11:04:42AM -0200, Fabio Estevam wrote:
> > commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> > location of iram.h, which causes the following build error when building the coda
> > driver:
> > 
> > drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> > drivers/media/platform/coda.c: In function 'coda_probe':
> > drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> > drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> > drivers/media/platform/coda.c: In function 'coda_remove':
> > drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free
> > 
> > Since the content of iram.h is not imx specific, move it to include/linux/iram.h
> > instead.
> 
> Generally we need a fix for this, but:
> 
> > diff --git a/arch/arm/mach-imx/iram.h b/include/linux/iram.h
> > similarity index 100%
> > rename from arch/arm/mach-imx/iram.h
> > rename to include/linux/iram.h
> 
> We shouldn't introduce a file include/linux/iram.h which is purely i.MX
> specific. The name is far too generic. I would rather suggest
> include/linux/platform_data/imx-iram.h (Although it's not exactly
> platform_data, so I'm open for better suggestions).
> 
> As a side note this i.MX specific iram stuff (hopefully) is obsolete
> after the next merge window as Philip already has patches for a generic
> iram allocator which didn't make it into this merge window.

Hi Sasha,

This compilation breakage seems to still be happening.

Just tested here with arm32 "allmodconfig", on a tree based on Linus one,
with -next and -media patches applied on it:

drivers/media//platform/coda.c:27:23: fatal error: mach/iram.h: No such file or directory
compilation terminated.

I don't mind how this would be named, but this should be fixed somehow ;)

Regards,
Mauro

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2012-12-27 22:15   ` Mauro Carvalho Chehab
@ 2013-01-02 11:29     ` Sascha Hauer
  0 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-01-02 11:29 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Fabio Estevam, kernel, p.zabel, javier.martin, linux-media, linux-kernel

Hi Mauro,

On Thu, Dec 27, 2012 at 08:15:12PM -0200, Mauro Carvalho Chehab wrote:
> Em Mon, 17 Dec 2012 10:37:14 +0100
> Sascha Hauer <s.hauer@pengutronix.de> escreveu:
> 
> > On Wed, Nov 14, 2012 at 11:04:42AM -0200, Fabio Estevam wrote:
> > > commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> > > location of iram.h, which causes the following build error when building the coda
> > > driver:
> > > 
> > > drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> > > drivers/media/platform/coda.c: In function 'coda_probe':
> > > drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> > > drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> > > drivers/media/platform/coda.c: In function 'coda_remove':
> > > drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free
> > > 
> > > Since the content of iram.h is not imx specific, move it to include/linux/iram.h
> > > instead.
> > 
> > Generally we need a fix for this, but:
> > 
> > > diff --git a/arch/arm/mach-imx/iram.h b/include/linux/iram.h
> > > similarity index 100%
> > > rename from arch/arm/mach-imx/iram.h
> > > rename to include/linux/iram.h
> > 
> > We shouldn't introduce a file include/linux/iram.h which is purely i.MX
> > specific. The name is far too generic. I would rather suggest
> > include/linux/platform_data/imx-iram.h (Although it's not exactly
> > platform_data, so I'm open for better suggestions).
> > 
> > As a side note this i.MX specific iram stuff (hopefully) is obsolete
> > after the next merge window as Philip already has patches for a generic
> > iram allocator which didn't make it into this merge window.
> 
> Hi Sasha,
> 
> This compilation breakage seems to still be happening.
> 
> Just tested here with arm32 "allmodconfig", on a tree based on Linus one,
> with -next and -media patches applied on it:
> 
> drivers/media//platform/coda.c:27:23: fatal error: mach/iram.h: No such file or directory
> compilation terminated.
> 
> I don't mind how this would be named, but this should be fixed somehow ;)

I will prepare a patch for this next week when I'm back in the office.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2013-01-07 15:46   ` Mauro Carvalho Chehab
@ 2013-01-07 15:48     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2013-01-07 15:48 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Mauro Carvalho Chehab, Fabio Estevam, linux-media, kernel,
	linux-kernel, Fabio Estevam

Em Mon, 7 Jan 2013 13:46:05 -0200
Mauro Carvalho Chehab <mchehab@infradead.org> escreveu:

> Em Mon, 7 Jan 2013 08:16:02 -0200
> Fabio Estevam <festevam@gmail.com> escreveu:
> 
> > Hi Sascha,
...
> > It would be better to use git mv /git format-patch -M, so that git can
> > detect the file rename.
> 
> Agreed. Anyway, I applied here and did a git show -M:
> 
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Mon, 7 Jan 2013 11:03:45 +0100
> Subject: [PATCH] coda: Fix build due to iram.h rename
> 
> commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> location of iram.h, which causes the following build error when building the coda
> driver:
> 
> drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> drivers/media/platform/coda.c: In function 'coda_probe':
> drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> drivers/media/platform/coda.c: In function 'coda_remove':
> drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'
> 
> Since the content of iram.h is not imx specific, move it to
> include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
> until the i.MX iram allocator is converted to the generic SRAM allocator.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Patch looks OK on my eyes.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>

> 
> diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
> index 6c80424..e05cf40 100644
> --- a/arch/arm/mach-imx/iram_alloc.c
> +++ b/arch/arm/mach-imx/iram_alloc.c
> @@ -22,8 +22,7 @@
>  #include <linux/module.h>
>  #include <linux/spinlock.h>
>  #include <linux/genalloc.h>
> -
> -#include "iram.h"
> +#include "linux/platform_data/imx-iram.h"
>  
>  static unsigned long iram_phys_base;
>  static void __iomem *iram_virt_base;
> diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
> index 2721f83..16a243d 100644
> --- a/drivers/media/platform/coda.c
> +++ b/drivers/media/platform/coda.c
> @@ -23,8 +23,8 @@
>  #include <linux/slab.h>
>  #include <linux/videodev2.h>
>  #include <linux/of.h>
> +#include <linux/platform_data/imx-iram.h>
>  
> -#include <mach/iram.h>
>  #include <media/v4l2-ctrls.h>
>  #include <media/v4l2-device.h>
>  #include <media/v4l2-ioctl.h>
> diff --git a/arch/arm/mach-imx/iram.h b/include/linux/platform_data/imx-iram.h
> similarity index 100%
> rename from arch/arm/mach-imx/iram.h
> rename to include/linux/platform_data/imx-iram.h

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2013-01-07 10:16 ` Fabio Estevam
  2013-01-07 13:21   ` Uwe Kleine-König
@ 2013-01-07 15:46   ` Mauro Carvalho Chehab
  2013-01-07 15:48     ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 9+ messages in thread
From: Mauro Carvalho Chehab @ 2013-01-07 15:46 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Sascha Hauer, linux-media, kernel, linux-kernel, Fabio Estevam

Em Mon, 7 Jan 2013 08:16:02 -0200
Fabio Estevam <festevam@gmail.com> escreveu:

> Hi Sascha,
> 
> On Mon, Jan 7, 2013 at 8:03 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> > location of iram.h, which causes the following build error when building the coda
> > driver:
> >
> > drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> > drivers/media/platform/coda.c: In function 'coda_probe':
> > drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> > drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> > drivers/media/platform/coda.c: In function 'coda_remove':
> > drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'
> >
> > Since the content of iram.h is not imx specific, move it to
> > include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
> > until the i.MX iram allocator is converted to the generic SRAM allocator.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >
> > Based on an earlier version from Fabio Estevam, but this one moves iram.h
> > to include/linux/platform_data/imx-iram.h instead of include/linux/iram.h
> > which is a less generic name.
> >
> >  arch/arm/mach-imx/iram.h               |   41 --------------------------------
> >  arch/arm/mach-imx/iram_alloc.c         |    3 +--
> >  drivers/media/platform/coda.c          |    2 +-
> >  include/linux/platform_data/imx-iram.h |   41 ++++++++++++++++++++++++++++++++
> >  4 files changed, 43 insertions(+), 44 deletions(-)
> >  delete mode 100644 arch/arm/mach-imx/iram.h
> >  create mode 100644 include/linux/platform_data/imx-iram.h
> 
> It would be better to use git mv /git format-patch -M, so that git can
> detect the file rename.

Agreed. Anyway, I applied here and did a git show -M:

From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Mon, 7 Jan 2013 11:03:45 +0100
Subject: [PATCH] coda: Fix build due to iram.h rename

commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
location of iram.h, which causes the following build error when building the coda
driver:

drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
drivers/media/platform/coda.c: In function 'coda_probe':
drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
drivers/media/platform/coda.c: In function 'coda_remove':
drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'

Since the content of iram.h is not imx specific, move it to
include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
until the i.MX iram allocator is converted to the generic SRAM allocator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
index 6c80424..e05cf40 100644
--- a/arch/arm/mach-imx/iram_alloc.c
+++ b/arch/arm/mach-imx/iram_alloc.c
@@ -22,8 +22,7 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/genalloc.h>
-
-#include "iram.h"
+#include "linux/platform_data/imx-iram.h"
 
 static unsigned long iram_phys_base;
 static void __iomem *iram_virt_base;
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 2721f83..16a243d 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -23,8 +23,8 @@
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 #include <linux/of.h>
+#include <linux/platform_data/imx-iram.h>
 
-#include <mach/iram.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
diff --git a/arch/arm/mach-imx/iram.h b/include/linux/platform_data/imx-iram.h
similarity index 100%
rename from arch/arm/mach-imx/iram.h
rename to include/linux/platform_data/imx-iram.h

Cheers,
Mauro

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2013-01-07 10:16 ` Fabio Estevam
@ 2013-01-07 13:21   ` Uwe Kleine-König
  2013-01-07 15:46   ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2013-01-07 13:21 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Sascha Hauer, linux-media, mchehab, kernel, linux-kernel, Fabio Estevam

Hello Fabio,

On Mon, Jan 07, 2013 at 08:16:02AM -0200, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Mon, Jan 7, 2013 at 8:03 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> > location of iram.h, which causes the following build error when building the coda
> > driver:
> >
> > drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> > drivers/media/platform/coda.c: In function 'coda_probe':
> > drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> > drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> > drivers/media/platform/coda.c: In function 'coda_remove':
> > drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'
> >
> > Since the content of iram.h is not imx specific, move it to
> > include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
> > until the i.MX iram allocator is converted to the generic SRAM allocator.
> >
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >
> > Based on an earlier version from Fabio Estevam, but this one moves iram.h
> > to include/linux/platform_data/imx-iram.h instead of include/linux/iram.h
> > which is a less generic name.
> >
> >  arch/arm/mach-imx/iram.h               |   41 --------------------------------
> >  arch/arm/mach-imx/iram_alloc.c         |    3 +--
> >  drivers/media/platform/coda.c          |    2 +-
> >  include/linux/platform_data/imx-iram.h |   41 ++++++++++++++++++++++++++++++++
> >  4 files changed, 43 insertions(+), 44 deletions(-)
> >  delete mode 100644 arch/arm/mach-imx/iram.h
> >  create mode 100644 include/linux/platform_data/imx-iram.h
> 
> It would be better to use git mv /git format-patch -M, so that git can
> detect the file rename.
Note that git-mv is not needed here. Using it doesn't change anything
and you can use git-format-patch -M independant of it.

Best regards
Uwe

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [media] coda: Fix build due to iram.h rename
  2013-01-07 10:03 Sascha Hauer
@ 2013-01-07 10:16 ` Fabio Estevam
  2013-01-07 13:21   ` Uwe Kleine-König
  2013-01-07 15:46   ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 9+ messages in thread
From: Fabio Estevam @ 2013-01-07 10:16 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-media, mchehab, kernel, linux-kernel, Fabio Estevam

Hi Sascha,

On Mon, Jan 7, 2013 at 8:03 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
> location of iram.h, which causes the following build error when building the coda
> driver:
>
> drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
> drivers/media/platform/coda.c: In function 'coda_probe':
> drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
> drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
> drivers/media/platform/coda.c: In function 'coda_remove':
> drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'
>
> Since the content of iram.h is not imx specific, move it to
> include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
> until the i.MX iram allocator is converted to the generic SRAM allocator.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> Based on an earlier version from Fabio Estevam, but this one moves iram.h
> to include/linux/platform_data/imx-iram.h instead of include/linux/iram.h
> which is a less generic name.
>
>  arch/arm/mach-imx/iram.h               |   41 --------------------------------
>  arch/arm/mach-imx/iram_alloc.c         |    3 +--
>  drivers/media/platform/coda.c          |    2 +-
>  include/linux/platform_data/imx-iram.h |   41 ++++++++++++++++++++++++++++++++
>  4 files changed, 43 insertions(+), 44 deletions(-)
>  delete mode 100644 arch/arm/mach-imx/iram.h
>  create mode 100644 include/linux/platform_data/imx-iram.h

It would be better to use git mv /git format-patch -M, so that git can
detect the file rename.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] [media] coda: Fix build due to iram.h rename
@ 2013-01-07 10:03 Sascha Hauer
  2013-01-07 10:16 ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2013-01-07 10:03 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, kernel, linux-kernel, Fabio Estevam, Sascha Hauer

commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
location of iram.h, which causes the following build error when building the coda
driver:

drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
drivers/media/platform/coda.c: In function 'coda_probe':
drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
drivers/media/platform/coda.c: In function 'coda_remove':
drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'

Since the content of iram.h is not imx specific, move it to
include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
until the i.MX iram allocator is converted to the generic SRAM allocator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---

Based on an earlier version from Fabio Estevam, but this one moves iram.h
to include/linux/platform_data/imx-iram.h instead of include/linux/iram.h
which is a less generic name.

 arch/arm/mach-imx/iram.h               |   41 --------------------------------
 arch/arm/mach-imx/iram_alloc.c         |    3 +--
 drivers/media/platform/coda.c          |    2 +-
 include/linux/platform_data/imx-iram.h |   41 ++++++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+), 44 deletions(-)
 delete mode 100644 arch/arm/mach-imx/iram.h
 create mode 100644 include/linux/platform_data/imx-iram.h

diff --git a/arch/arm/mach-imx/iram.h b/arch/arm/mach-imx/iram.h
deleted file mode 100644
index 022690c..0000000
--- a/arch/arm/mach-imx/iram.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-#include <linux/errno.h>
-
-#ifdef CONFIG_IRAM_ALLOC
-
-int __init iram_init(unsigned long base, unsigned long size);
-void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr);
-void iram_free(unsigned long dma_addr, unsigned int size);
-
-#else
-
-static inline int __init iram_init(unsigned long base, unsigned long size)
-{
-	return -ENOMEM;
-}
-
-static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr)
-{
-	return NULL;
-}
-
-static inline void iram_free(unsigned long base, unsigned long size) {}
-
-#endif
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
index 6c80424..e05cf40 100644
--- a/arch/arm/mach-imx/iram_alloc.c
+++ b/arch/arm/mach-imx/iram_alloc.c
@@ -22,8 +22,7 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/genalloc.h>
-
-#include "iram.h"
+#include "linux/platform_data/imx-iram.h"
 
 static unsigned long iram_phys_base;
 static void __iomem *iram_virt_base;
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 7b8b547..afadd3a 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -23,8 +23,8 @@
 #include <linux/slab.h>
 #include <linux/videodev2.h>
 #include <linux/of.h>
+#include <linux/platform_data/imx-iram.h>
 
-#include <mach/iram.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ioctl.h>
diff --git a/include/linux/platform_data/imx-iram.h b/include/linux/platform_data/imx-iram.h
new file mode 100644
index 0000000..022690c
--- /dev/null
+++ b/include/linux/platform_data/imx-iram.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+#include <linux/errno.h>
+
+#ifdef CONFIG_IRAM_ALLOC
+
+int __init iram_init(unsigned long base, unsigned long size);
+void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr);
+void iram_free(unsigned long dma_addr, unsigned int size);
+
+#else
+
+static inline int __init iram_init(unsigned long base, unsigned long size)
+{
+	return -ENOMEM;
+}
+
+static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr)
+{
+	return NULL;
+}
+
+static inline void iram_free(unsigned long base, unsigned long size) {}
+
+#endif
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-07 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 13:04 [PATCH] [media] coda: Fix build due to iram.h rename Fabio Estevam
2012-12-17  9:37 ` Sascha Hauer
2012-12-27 22:15   ` Mauro Carvalho Chehab
2013-01-02 11:29     ` Sascha Hauer
2013-01-07 10:03 Sascha Hauer
2013-01-07 10:16 ` Fabio Estevam
2013-01-07 13:21   ` Uwe Kleine-König
2013-01-07 15:46   ` Mauro Carvalho Chehab
2013-01-07 15:48     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).