kernel: remove obsolete dependencies and conditionals
[openwrt/svn-archive/archive.git] / package / kernel / modules / video.mk
index a7f508bb8e8bfd2fa16e08fb751507238d351872..d5063e8250783134499e489f26d9d2531fcf66cd 100644 (file)
@@ -22,18 +22,10 @@ define KernelPackage/video-core
        CONFIG_V4L_PCI_DRIVERS=y \
        CONFIG_V4L_PLATFORM_DRIVERS=y \
        CONFIG_V4L_ISA_PARPORT_DRIVERS=y
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.38)),1)
   FILES:= \
        $(LINUX_DIR)/drivers/media/video/v4l2-common.ko \
        $(LINUX_DIR)/drivers/media/video/videodev.ko
   AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
-else
-  FILES:= \
-       $(LINUX_DIR)/drivers/media/video/v4l2-common.ko \
-       $(LINUX_DIR)/drivers/media/video/v4l1-compat.ko \
-       $(LINUX_DIR)/drivers/media/video/videodev.ko
-  AUTOLOAD:=$(call AutoLoad,60, v4l1-compat videodev v4l2-common)
-endif
 endef
 
 define KernelPackage/video-core/description
@@ -49,6 +41,27 @@ define AddDepends/video
 endef
 
 
+define KernelPackage/video-videobuf2
+  TITLE:=videobuf2 lib
+  KCONFIG:= \
+       CONFIG_VIDEOBUF2_CORE \
+       CONFIG_VIDEOBUF2_MEMOPS \
+       CONFIG_VIDEOBUF2_VMALLOC
+  FILES:= \
+       $(LINUX_DIR)/drivers/media/video/videobuf2-core.ko \
+       $(LINUX_DIR)/drivers/media/video/videobuf2-memops.ko \
+       $(LINUX_DIR)/drivers/media/video/videobuf2-vmalloc.ko
+  AUTOLOAD:=$(call AutoLoad,65,videobuf2-core videobuf2-memops videobuf2-vmalloc)
+  $(call AddDepends/video)
+endef
+
+define KernelPackage/video-videobuf2/description
+ Kernel modules for supporting CPIA2 USB based cameras.
+endef
+
+$(eval $(call KernelPackage,video-videobuf2))
+
+
 define KernelPackage/video-cpia2
   TITLE:=CPIA2 video driver
   DEPENDS:=@USB_SUPPORT +kmod-usb-core
@@ -85,7 +98,7 @@ $(eval $(call KernelPackage,video-sn9c102))
 
 define KernelPackage/video-pwc
   TITLE:=Philips USB webcam support
-  DEPENDS:=@USB_SUPPORT +kmod-usb-core
+  DEPENDS:=@USB_SUPPORT +kmod-usb-core +!LINUX_2_6_39:kmod-video-videobuf2
   KCONFIG:= \
        CONFIG_USB_PWC \
        CONFIG_USB_PWC_DEBUG=n
@@ -103,7 +116,7 @@ $(eval $(call KernelPackage,video-pwc))
 
 define KernelPackage/video-uvc
   TITLE:=USB Video Class (UVC) support
-  DEPENDS:=@USB_SUPPORT +kmod-usb-core
+  DEPENDS:=@USB_SUPPORT +kmod-usb-core +!(LINUX_2_6_39||LINUX_3_1||LINUX_3_2):kmod-video-videobuf2
   KCONFIG:= CONFIG_USB_VIDEO_CLASS
   FILES:=$(LINUX_DIR)/drivers/media/video/uvc/uvcvideo.ko
   AUTOLOAD:=$(call AutoLoad,90,uvcvideo)