From 05c90900e24be491102a6018e242ee7ca602918b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 5 Apr 2018 12:31:39 -0400 Subject: media: davinci: allow build vpbe_display with COMPILE_TEST Except for some includes (with doesn't seem to be used), this driver builds fine with COMPILE_TEST. So, add checks there to avoid building it if ARCH_DAVINCI is not selected. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/Kconfig | 3 ++- drivers/media/platform/davinci/vpbe_display.c | 3 +++ drivers/media/platform/davinci/vpbe_osd.c | 2 ++ drivers/media/platform/davinci/vpbe_venc.c | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/Kconfig b/drivers/media/platform/davinci/Kconfig index babdb4877b3f..b463d1726335 100644 --- a/drivers/media/platform/davinci/Kconfig +++ b/drivers/media/platform/davinci/Kconfig @@ -82,7 +82,8 @@ config VIDEO_DM365_ISIF config VIDEO_DAVINCI_VPBE_DISPLAY tristate "TI DaVinci VPBE V4L2-Display driver" - depends on VIDEO_V4L2 && ARCH_DAVINCI + depends on VIDEO_V4L2 + depends on ARCH_DAVINCI || COMPILE_TEST depends on HAS_DMA depends on I2C select VIDEOBUF2_DMA_CONTIG diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 6aabd21fe69f..7b6cd4b3ccc4 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -26,7 +26,10 @@ #include #include + +#ifdef CONFIG_ARCH_DAVINCI #include +#endif #include #include diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index 66449791c70c..10f2bf11edf3 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -24,8 +24,10 @@ #include #include +#ifdef CONFIG_ARCH_DAVINCI #include #include +#endif #include #include diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c index 3a4e78595149..add72a39ef2d 100644 --- a/drivers/media/platform/davinci/vpbe_venc.c +++ b/drivers/media/platform/davinci/vpbe_venc.c @@ -21,8 +21,11 @@ #include #include +#ifdef CONFIG_ARCH_DAVINCI #include #include +#endif + #include #include -- cgit v1.2.3