[media] coda: Fix build due to iram.h rename

Message ID 1352898282-21576-1-git-send-email-fabio.estevam@freescale.com (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Fabio Estevam Nov. 14, 2012, 1:04 p.m. UTC
  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.h b/include/linux/iram.h
similarity index 100%
rename from arch/arm/mach-imx/iram.h
rename to include/linux/iram.h
  

Comments

Fabio Estevam Dec. 3, 2012, 11:50 p.m. UTC | #1
Hi Mauro,

On Wed, Nov 14, 2012 at 11:04 AM, Fabio Estevam
<fabio.estevam@freescale.com> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Any comments on this one, please?

coda driver does not build currently.

Thanks,

Fabio Estevam
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Sascha Hauer Dec. 17, 2012, 9:37 a.m. UTC | #2
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
  
Mauro Carvalho Chehab Dec. 27, 2012, 10:15 p.m. UTC | #3
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Sascha Hauer Jan. 2, 2013, 11:29 a.m. UTC | #4
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
  

Patch

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>