[media] v4l: move v4l2 core into a separate directory
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 14 Jun 2012 19:35:52 +0000 (16:35 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 14 Aug 2012 02:02:38 +0000 (23:02 -0300)
Currently, the v4l2 core is mixed together with other non-core drivers.
Move them into a separate directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
28 files changed:
drivers/media/Kconfig
drivers/media/Makefile
drivers/media/v4l2-core/Kconfig [new file with mode: 0644]
drivers/media/v4l2-core/Makefile [new file with mode: 0644]
drivers/media/v4l2-core/tuner-core.c [moved from drivers/media/video/tuner-core.c with 100% similarity]
drivers/media/v4l2-core/v4l2-common.c [moved from drivers/media/video/v4l2-common.c with 100% similarity]
drivers/media/v4l2-core/v4l2-compat-ioctl32.c [moved from drivers/media/video/v4l2-compat-ioctl32.c with 100% similarity]
drivers/media/v4l2-core/v4l2-ctrls.c [moved from drivers/media/video/v4l2-ctrls.c with 100% similarity]
drivers/media/v4l2-core/v4l2-dev.c [moved from drivers/media/video/v4l2-dev.c with 100% similarity]
drivers/media/v4l2-core/v4l2-device.c [moved from drivers/media/video/v4l2-device.c with 100% similarity]
drivers/media/v4l2-core/v4l2-event.c [moved from drivers/media/video/v4l2-event.c with 100% similarity]
drivers/media/v4l2-core/v4l2-fh.c [moved from drivers/media/video/v4l2-fh.c with 100% similarity]
drivers/media/v4l2-core/v4l2-int-device.c [moved from drivers/media/video/v4l2-int-device.c with 100% similarity]
drivers/media/v4l2-core/v4l2-ioctl.c [moved from drivers/media/video/v4l2-ioctl.c with 100% similarity]
drivers/media/v4l2-core/v4l2-mem2mem.c [moved from drivers/media/video/v4l2-mem2mem.c with 100% similarity]
drivers/media/v4l2-core/v4l2-subdev.c [moved from drivers/media/video/v4l2-subdev.c with 100% similarity]
drivers/media/v4l2-core/videobuf-core.c [moved from drivers/media/video/videobuf-core.c with 100% similarity]
drivers/media/v4l2-core/videobuf-dma-contig.c [moved from drivers/media/video/videobuf-dma-contig.c with 100% similarity]
drivers/media/v4l2-core/videobuf-dma-sg.c [moved from drivers/media/video/videobuf-dma-sg.c with 100% similarity]
drivers/media/v4l2-core/videobuf-dvb.c [moved from drivers/media/video/videobuf-dvb.c with 100% similarity]
drivers/media/v4l2-core/videobuf-vmalloc.c [moved from drivers/media/video/videobuf-vmalloc.c with 100% similarity]
drivers/media/v4l2-core/videobuf2-core.c [moved from drivers/media/video/videobuf2-core.c with 100% similarity]
drivers/media/v4l2-core/videobuf2-dma-contig.c [moved from drivers/media/video/videobuf2-dma-contig.c with 100% similarity]
drivers/media/v4l2-core/videobuf2-dma-sg.c [moved from drivers/media/video/videobuf2-dma-sg.c with 100% similarity]
drivers/media/v4l2-core/videobuf2-memops.c [moved from drivers/media/video/videobuf2-memops.c with 100% similarity]
drivers/media/v4l2-core/videobuf2-vmalloc.c [moved from drivers/media/video/videobuf2-vmalloc.c with 100% similarity]
drivers/media/video/Kconfig
drivers/media/video/Makefile

index d941581..e625362 100644 (file)
@@ -152,6 +152,7 @@ source "drivers/media/common/tuners/Kconfig"
 # Video/Radio/Hybrid adapters
 #
 
+source "drivers/media/v4l2-core/Kconfig"
 source "drivers/media/video/Kconfig"
 
 source "drivers/media/radio/Kconfig"
index 64755c9..2f9abaa 100644 (file)
@@ -8,7 +8,7 @@ ifeq ($(CONFIG_MEDIA_CONTROLLER),y)
   obj-$(CONFIG_MEDIA_SUPPORT) += media.o
 endif
 
-obj-y += common/ rc/ video/
+obj-y += v4l2-core/ common/ rc/ video/
 
 obj-$(CONFIG_VIDEO_DEV) += radio/
 obj-$(CONFIG_DVB_CORE)  += dvb/
diff --git a/drivers/media/v4l2-core/Kconfig b/drivers/media/v4l2-core/Kconfig
new file mode 100644 (file)
index 0000000..6f53337
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Generic video config states
+#
+
+config VIDEO_V4L2
+       tristate
+       depends on VIDEO_DEV && VIDEO_V4L2_COMMON
+       default y
+
+config VIDEOBUF_GEN
+       tristate
+
+config VIDEOBUF_DMA_SG
+       depends on HAS_DMA
+       select VIDEOBUF_GEN
+       tristate
+
+config VIDEOBUF_VMALLOC
+       select VIDEOBUF_GEN
+       tristate
+
+config VIDEOBUF_DMA_CONTIG
+       depends on HAS_DMA
+       select VIDEOBUF_GEN
+       tristate
+
+config VIDEOBUF_DVB
+       tristate
+       select VIDEOBUF_GEN
+
+config VIDEO_TUNER
+       tristate
+       depends on MEDIA_TUNER
+
+config V4L2_MEM2MEM_DEV
+        tristate
+        depends on VIDEOBUF2_CORE
+
+config VIDEOBUF2_CORE
+       tristate
+
+config VIDEOBUF2_MEMOPS
+       tristate
+
+config VIDEOBUF2_DMA_CONTIG
+       select VIDEOBUF2_CORE
+       select VIDEOBUF2_MEMOPS
+       tristate
+
+config VIDEOBUF2_VMALLOC
+       select VIDEOBUF2_CORE
+       select VIDEOBUF2_MEMOPS
+       tristate
+
+config VIDEOBUF2_DMA_SG
+       #depends on HAS_DMA
+       select VIDEOBUF2_CORE
+       select VIDEOBUF2_MEMOPS
+       tristate
+
diff --git a/drivers/media/v4l2-core/Makefile b/drivers/media/v4l2-core/Makefile
new file mode 100644 (file)
index 0000000..7319c27
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# Makefile for the V4L2 core
+#
+
+tuner-objs     :=      tuner-core.o
+
+videodev-objs  :=      v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
+                       v4l2-event.o v4l2-ctrls.o v4l2-subdev.o
+ifeq ($(CONFIG_COMPAT),y)
+  videodev-objs += v4l2-compat-ioctl32.o
+endif
+
+obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
+obj-$(CONFIG_VIDEO_V4L2_COMMON) += v4l2-common.o
+
+obj-$(CONFIG_VIDEO_TUNER) += tuner.o
+
+obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o
+
+obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
+obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
+obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
+obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
+obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
+
+obj-$(CONFIG_VIDEOBUF2_CORE) += videobuf2-core.o
+obj-$(CONFIG_VIDEOBUF2_MEMOPS) += videobuf2-memops.o
+obj-$(CONFIG_VIDEOBUF2_VMALLOC) += videobuf2-vmalloc.o
+obj-$(CONFIG_VIDEOBUF2_DMA_CONTIG) += videobuf2-dma-contig.o
+obj-$(CONFIG_VIDEOBUF2_DMA_SG) += videobuf2-dma-sg.o
+
+ccflags-y += -I$(srctree)/drivers/media/dvb/dvb-core
+ccflags-y += -I$(srctree)/drivers/media/dvb/frontends
+ccflags-y += -I$(srctree)/drivers/media/common/tuners
+
index a5e3bd0..068e8da 100644 (file)
@@ -2,32 +2,6 @@
 # Generic video config states
 #
 
-config VIDEO_V4L2
-       tristate
-       depends on VIDEO_DEV && VIDEO_V4L2_COMMON
-       default y
-
-config VIDEOBUF_GEN
-       tristate
-
-config VIDEOBUF_DMA_SG
-       depends on HAS_DMA
-       select VIDEOBUF_GEN
-       tristate
-
-config VIDEOBUF_VMALLOC
-       select VIDEOBUF_GEN
-       tristate
-
-config VIDEOBUF_DMA_CONTIG
-       depends on HAS_DMA
-       select VIDEOBUF_GEN
-       tristate
-
-config VIDEOBUF_DVB
-       tristate
-       select VIDEOBUF_GEN
-
 config VIDEO_BTCX
        depends on PCI
        tristate
@@ -36,36 +10,6 @@ config VIDEO_TVEEPROM
        tristate
        depends on I2C
 
-config VIDEO_TUNER
-       tristate
-       depends on MEDIA_TUNER
-
-config V4L2_MEM2MEM_DEV
-       tristate
-       depends on VIDEOBUF2_CORE
-
-config VIDEOBUF2_CORE
-       tristate
-
-config VIDEOBUF2_MEMOPS
-       tristate
-
-config VIDEOBUF2_DMA_CONTIG
-       select VIDEOBUF2_CORE
-       select VIDEOBUF2_MEMOPS
-       tristate
-
-config VIDEOBUF2_VMALLOC
-       select VIDEOBUF2_CORE
-       select VIDEOBUF2_MEMOPS
-       tristate
-
-
-config VIDEOBUF2_DMA_SG
-       #depends on HAS_DMA
-       select VIDEOBUF2_CORE
-       select VIDEOBUF2_MEMOPS
-       tristate
 #
 # Multimedia Video device configuration
 #
index 12cad12..839e2c9 100644 (file)
@@ -2,32 +2,18 @@
 # Makefile for the video capture/playback device drivers.
 #
 
-tuner-objs     :=      tuner-core.o
-
 msp3400-objs   :=      msp3400-driver.o msp3400-kthreads.o
 
 stkwebcam-objs :=      stk-webcam.o stk-sensor.o
 
 omap2cam-objs  :=      omap24xxcam.o omap24xxcam-dma.o
 
-videodev-objs  :=      v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
-                       v4l2-event.o v4l2-ctrls.o v4l2-subdev.o
-ifeq ($(CONFIG_COMPAT),y)
-  videodev-objs += v4l2-compat-ioctl32.o
-endif
-
-# V4L2 core modules
-
-obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-int-device.o
-obj-$(CONFIG_VIDEO_V4L2_COMMON) += v4l2-common.o
-
 # Helper modules
 
 obj-$(CONFIG_VIDEO_APTINA_PLL) += aptina-pll.o
 
 # All i2c modules must come first:
 
-obj-$(CONFIG_VIDEO_TUNER) += tuner.o
 obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
 obj-$(CONFIG_VIDEO_TDA7432) += tda7432.o
 obj-$(CONFIG_VIDEO_SAA6588) += saa6588.o
@@ -128,21 +114,8 @@ obj-$(CONFIG_STA2X11_VIP) += sta2x11_vip.o
 obj-$(CONFIG_VIDEO_TIMBERDALE) += timblogiw.o
 obj-$(CONFIG_VIDEO_STK1160) += stk1160/
 
-obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
-obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
-obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
-obj-$(CONFIG_VIDEOBUF_VMALLOC) += videobuf-vmalloc.o
-obj-$(CONFIG_VIDEOBUF_DVB) += videobuf-dvb.o
 obj-$(CONFIG_VIDEO_BTCX)  += btcx-risc.o
 
-obj-$(CONFIG_VIDEOBUF2_CORE)           += videobuf2-core.o
-obj-$(CONFIG_VIDEOBUF2_MEMOPS)         += videobuf2-memops.o
-obj-$(CONFIG_VIDEOBUF2_VMALLOC)                += videobuf2-vmalloc.o
-obj-$(CONFIG_VIDEOBUF2_DMA_CONTIG)     += videobuf2-dma-contig.o
-obj-$(CONFIG_VIDEOBUF2_DMA_SG)         += videobuf2-dma-sg.o
-
-obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o
-
 obj-$(CONFIG_VIDEO_M32R_AR_M64278) += arv.o
 
 obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o