Re: Compile failure on linux-n900 branch -- MEDIA_CAMERA_SUPPORTneeded for n900 compilation

From: Pavel Machek
Date: Sun Dec 01 2013 - 15:01:18 EST


Hi!

> board-rx51-camera.c is not part of mainline kernel and will never
> be (due to DT migration). So maybe it could be better to add
> #ifdef to board-rx51-camera.c. Keeping changes for Makefile/Kconfig
> files is harder because of future rebase...

Ok, that makes sense.

This breaks compilation, too, but I don't think I want to fix that.

Example code (PVR_EXAMPLES) [N/m/y] (NEW)

(Select Y to break compile).

Thanks,
Pavel

---

Fix compilation in !CONFIG_MEDIA_CAMERA_SUPPORT case, and make it such
that it is unlikely to cause merge conflicts later.

Signed-off-by: Pavel Machek <pavel@xxxxxx>

diff --git a/arch/arm/mach-omap2/board-rx51-camera.c b/arch/arm/mach-omap2/board-rx51-camera.c
index 8b4b59a..bae2cc0 100644
--- a/arch/arm/mach-omap2/board-rx51-camera.c
+++ b/arch/arm/mach-omap2/board-rx51-camera.c
@@ -31,6 +31,7 @@

#include <asm/gpio.h>

+#ifdef CONFIG_MEDIA_CAMERA_SUPPORT
#include "../../../drivers/media/platform/omap3isp/isp.h"
#include "../../../drivers/media/platform/omap3isp/ispreg.h"

@@ -375,9 +376,11 @@ static struct isp_platform_data rx51_isp_platform_data = {
{ .dev_id = "2-0010"},
.subdevs = rx51_camera_subdevs,
};
+#endif

void __init rx51_camera_init(void)
{
+#ifdef CONFIG_MEDIA_CAMERA_SUPPORT
if (rx51_camera_hw_init()) {
printk(KERN_WARNING "%s: Unable to initialize camera\n",
__func__);
@@ -387,4 +390,5 @@ void __init rx51_camera_init(void)
if (omap3_init_camera(&rx51_isp_platform_data) < 0)
printk(KERN_WARNING "%s: Unable to register camera platform "
"device\n", __func__);
+#endif
}




--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/