@@ -16,6 +16,7 @@ config CYPRESS_FIRMWARE
tristate "Cypress firmware helper routines"
depends on USB
+source "drivers/media/common/videobuf/Kconfig"
source "drivers/media/common/b2c2/Kconfig"
source "drivers/media/common/saa7146/Kconfig"
source "drivers/media/common/siano/Kconfig"
@@ -1,4 +1,4 @@
-obj-y += b2c2/ saa7146/ siano/ v4l2-tpg/
+obj-y += b2c2/ saa7146/ siano/ v4l2-tpg/ videobuf/
obj-$(CONFIG_VIDEO_CX2341X) += cx2341x.o
obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
obj-$(CONFIG_CYPRESS_FIRMWARE) += cypress_firmware.o
new file mode 100644
@@ -0,0 +1,31 @@
+# Used by drivers that need Videobuf2 modules
+config VIDEOBUF2_CORE
+ select DMA_SHARED_BUFFER
+ tristate
+
+config VIDEOBUF2_MEMOPS
+ tristate
+ select FRAME_VECTOR
+
+config VIDEOBUF2_DMA_CONTIG
+ tristate
+ depends on HAS_DMA
+ select VIDEOBUF2_CORE
+ select VIDEOBUF2_MEMOPS
+ select DMA_SHARED_BUFFER
+
+config VIDEOBUF2_VMALLOC
+ tristate
+ select VIDEOBUF2_CORE
+ select VIDEOBUF2_MEMOPS
+ select DMA_SHARED_BUFFER
+
+config VIDEOBUF2_DMA_SG
+ tristate
+ depends on HAS_DMA
+ select VIDEOBUF2_CORE
+ select VIDEOBUF2_MEMOPS
+
+config VIDEOBUF2_DVB
+ tristate
+ select VIDEOBUF2_CORE
new file mode 100644
@@ -0,0 +1,7 @@
+
+obj-$(CONFIG_VIDEOBUF2_CORE) += videobuf2-core.o videobuf2-v4l2.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_VIDEOBUF2_DVB) += videobuf2-dvb.o
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-core.c
rename to drivers/media/common/videobuf/videobuf2-core.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-dma-contig.c
rename to drivers/media/common/videobuf/videobuf2-dma-contig.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-dma-sg.c
rename to drivers/media/common/videobuf/videobuf2-dma-sg.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-dvb.c
rename to drivers/media/common/videobuf/videobuf2-dvb.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-memops.c
rename to drivers/media/common/videobuf/videobuf2-memops.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-v4l2.c
rename to drivers/media/common/videobuf/videobuf2-v4l2.c
similarity index 100%
rename from drivers/media/v4l2-core/videobuf2-vmalloc.c
rename to drivers/media/common/videobuf/videobuf2-vmalloc.c
@@ -79,35 +79,3 @@ config VIDEOBUF_DMA_CONTIG
config VIDEOBUF_DVB
tristate
select VIDEOBUF_GEN
-
-# Used by drivers that need Videobuf2 modules
-config VIDEOBUF2_CORE
- select DMA_SHARED_BUFFER
- tristate
-
-config VIDEOBUF2_MEMOPS
- tristate
- select FRAME_VECTOR
-
-config VIDEOBUF2_DMA_CONTIG
- tristate
- depends on HAS_DMA
- select VIDEOBUF2_CORE
- select VIDEOBUF2_MEMOPS
- select DMA_SHARED_BUFFER
-
-config VIDEOBUF2_VMALLOC
- tristate
- select VIDEOBUF2_CORE
- select VIDEOBUF2_MEMOPS
- select DMA_SHARED_BUFFER
-
-config VIDEOBUF2_DMA_SG
- tristate
- depends on HAS_DMA
- select VIDEOBUF2_CORE
- select VIDEOBUF2_MEMOPS
-
-config VIDEOBUF2_DVB
- tristate
- select VIDEOBUF2_CORE
@@ -33,13 +33,6 @@ 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 videobuf2-v4l2.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_VIDEOBUF2_DVB) += videobuf2-dvb.o
-
ccflags-y += -I$(srctree)/drivers/media/dvb-core
ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
ccflags-y += -I$(srctree)/drivers/media/tuners
Now that VB2 is used by both V4L2 and DVB core, move it to the common part of the subsystem. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> --- drivers/media/common/Kconfig | 1 + drivers/media/common/Makefile | 2 +- drivers/media/common/videobuf/Kconfig | 31 +++++++++++++++++++++ drivers/media/common/videobuf/Makefile | 7 +++++ .../videobuf}/videobuf2-core.c | 0 .../videobuf}/videobuf2-dma-contig.c | 0 .../videobuf}/videobuf2-dma-sg.c | 0 .../{v4l2-core => common/videobuf}/videobuf2-dvb.c | 0 .../videobuf}/videobuf2-memops.c | 0 .../videobuf}/videobuf2-v4l2.c | 0 .../videobuf}/videobuf2-vmalloc.c | 0 drivers/media/v4l2-core/Kconfig | 32 ---------------------- drivers/media/v4l2-core/Makefile | 7 ----- 13 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 drivers/media/common/videobuf/Kconfig create mode 100644 drivers/media/common/videobuf/Makefile rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-core.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dma-contig.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dma-sg.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dvb.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-memops.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-v4l2.c (100%) rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-vmalloc.c (100%)