[media] v4l2-pci-skeleton: Only build if PCI is available

Message ID 1409071130-22183-1-git-send-email-broonie@kernel.org
State New
Headers show

Commit Message

Mark Brown Aug. 26, 2014, 4:38 p.m.
From: Mark Brown <broonie@linaro.org>

Currently arm64 does not support PCI but it does support v4l2. Since the
PCI skeleton driver is built unconditionally as a module with no dependency
on PCI this causes build failures for arm64 allmodconfig. Fix this by
defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising
the build on that.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 Documentation/video4linux/Makefile | 2 +-
 drivers/media/v4l2-core/Kconfig    | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

Hans Verkuil Aug. 26, 2014, 4:56 p.m. | #1
Against which kernel is this? Documentation/video4linux/Makefile doesn't exist
in either the mainline kernel or the media_tree git repo.

Regards,

	Hans

On 08/26/2014 06:38 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> Currently arm64 does not support PCI but it does support v4l2. Since the
> PCI skeleton driver is built unconditionally as a module with no dependency
> on PCI this causes build failures for arm64 allmodconfig. Fix this by
> defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising
> the build on that.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  Documentation/video4linux/Makefile | 2 +-
>  drivers/media/v4l2-core/Kconfig    | 7 +++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile
> index d58101e788fc..65a351d75c95 100644
> --- a/Documentation/video4linux/Makefile
> +++ b/Documentation/video4linux/Makefile
> @@ -1 +1 @@
> -obj-m := v4l2-pci-skeleton.o
> +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o
> diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
> index 9ca0f8d59a14..2b368f711c9e 100644
> --- a/drivers/media/v4l2-core/Kconfig
> +++ b/drivers/media/v4l2-core/Kconfig
> @@ -25,6 +25,13 @@ config VIDEO_FIXED_MINOR_RANGES
>  
>  	  When in doubt, say N.
>  
> +config VIDEO_PCI_SKELETON
> +	tristate "Skeleton PCI V4L2 driver"
> +	depends on PCI && COMPILE_TEST
> +	---help---
> +	  Enable build of the skeleton PCI driver, used as a reference
> +	  when developign new drivers.
> +
>  # Used by drivers that need tuner.ko
>  config VIDEO_TUNER
>  	tristate
> 

--
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
Mark Brown Aug. 26, 2014, 5:22 p.m. | #2
On Tue, Aug 26, 2014 at 06:56:05PM +0200, Hans Verkuil wrote:
> Against which kernel is this? Documentation/video4linux/Makefile doesn't exist
> in either the mainline kernel or the media_tree git repo.

This is against -next, looks like the bug is in the Documentation
tree...
Hans Verkuil Aug. 26, 2014, 9:01 p.m. | #3
On 08/26/2014 06:38 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> Currently arm64 does not support PCI but it does support v4l2. Since the
> PCI skeleton driver is built unconditionally as a module with no dependency
> on PCI this causes build failures for arm64 allmodconfig. Fix this by
> defining a symbol VIDEO_PCI_SKELETON for the skeleton and conditionalising
> the build on that.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  Documentation/video4linux/Makefile | 2 +-
>  drivers/media/v4l2-core/Kconfig    | 7 +++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile
> index d58101e788fc..65a351d75c95 100644
> --- a/Documentation/video4linux/Makefile
> +++ b/Documentation/video4linux/Makefile
> @@ -1 +1 @@
> -obj-m := v4l2-pci-skeleton.o
> +obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o
> diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
> index 9ca0f8d59a14..2b368f711c9e 100644
> --- a/drivers/media/v4l2-core/Kconfig
> +++ b/drivers/media/v4l2-core/Kconfig
> @@ -25,6 +25,13 @@ config VIDEO_FIXED_MINOR_RANGES
>  
>  	  When in doubt, say N.
>  
> +config VIDEO_PCI_SKELETON
> +	tristate "Skeleton PCI V4L2 driver"
> +	depends on PCI && COMPILE_TEST
> +	---help---
> +	  Enable build of the skeleton PCI driver, used as a reference
> +	  when developign new drivers.

Typo: developign -> developing

> +
>  # Used by drivers that need tuner.ko
>  config VIDEO_TUNER
>  	tristate
> 

--
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

Patch

diff --git a/Documentation/video4linux/Makefile b/Documentation/video4linux/Makefile
index d58101e788fc..65a351d75c95 100644
--- a/Documentation/video4linux/Makefile
+++ b/Documentation/video4linux/Makefile
@@ -1 +1 @@ 
-obj-m := v4l2-pci-skeleton.o
+obj-$(CONFIG_VIDEO_PCI_SKELETON) := v4l2-pci-skeleton.o
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
index 9ca0f8d59a14..2b368f711c9e 100644
--- a/drivers/media/v4l2-core/Kconfig
+++ b/drivers/media/v4l2-core/Kconfig
@@ -25,6 +25,13 @@  config VIDEO_FIXED_MINOR_RANGES
 
 	  When in doubt, say N.
 
+config VIDEO_PCI_SKELETON
+	tristate "Skeleton PCI V4L2 driver"
+	depends on PCI && COMPILE_TEST
+	---help---
+	  Enable build of the skeleton PCI driver, used as a reference
+	  when developign new drivers.
+
 # Used by drivers that need tuner.ko
 config VIDEO_TUNER
 	tristate