Re: [RFC PATCH v2 1/5] media: videobuf2: Rename videobuf2-core to videobuf2-v4l2

2015-08-10 Thread Hans Verkuil
Hi Junghak,

On 07/31/2015 10:44 AM, Junghak Sung wrote:
 Rename file name - from videobuf2-core.[ch] to videobuf2-v4l2.[ch]
 This renaming patch should be accompanied by the modifications for all device
 drivers that include this header file. It can be done with just running this
 shell script.
 
 replace()
 {
 str1=$1
 str2=$2
 dir=$3
 for file in $(find $dir -name *.h -o -name *.c -o -name Makefile)
 do
 echo $file
 sed s/$str1/$str2/g $file  $file.out
 mv $file.out $file
 done
 }
 replace videobuf2-core videobuf2-v4l2 include/media/
 replace videobuf2-core videobuf2-v4l2 drivers/media/
 
 Signed-off-by: Junghak Sung jh1009.s...@samsung.com
 Signed-off-by: Geunyoung Kim nenggun@samsung.com
 Acked-by: Seung-Woo Kim sw0312@samsung.com
 Acked-by: Inki Dae inki@samsung.com

Rather than moving videobuf2-core.c to videobuf2-v4l2.c I would recommend to 
just
create a videobuf2-v4l2.h header that includes videobuf2-core.h and nothing 
else.

So this patch will move all drivers over to include the new videobuf2-v4l2.h 
header,
leaving everything else unchanged.

Then in patch 3 you can move code from videobuf2-core.c/h to 
videobuf2-v4l2.c/h. This
will make patch 3 easier to read for me since I can clearly see in the diff what
has been moved from -core.c/h to -v4l2.c/h.

Right now patch 3 shows what moved from -v4l2.c/h to -core.c/h, which is the 
wrong
way around. And makes patch 3 much larger than it needs to be since 
(unsurprisingly)
most code from v4l2.c/h moves back to core.c/h.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC PATCH v2 1/5] media: videobuf2: Rename videobuf2-core to videobuf2-v4l2

2015-07-31 Thread Junghak Sung
Rename file name - from videobuf2-core.[ch] to videobuf2-v4l2.[ch]
This renaming patch should be accompanied by the modifications for all device
drivers that include this header file. It can be done with just running this
shell script.

replace()
{
str1=$1
str2=$2
dir=$3
for file in $(find $dir -name *.h -o -name *.c -o -name Makefile)
do
echo $file
sed s/$str1/$str2/g $file  $file.out
mv $file.out $file
done
}
replace videobuf2-core videobuf2-v4l2 include/media/
replace videobuf2-core videobuf2-v4l2 drivers/media/

Signed-off-by: Junghak Sung jh1009.s...@samsung.com
Signed-off-by: Geunyoung Kim nenggun@samsung.com
Acked-by: Seung-Woo Kim sw0312@samsung.com
Acked-by: Inki Dae inki@samsung.com
---
 drivers/media/pci/solo6x10/solo6x10.h  |2 +-
 drivers/media/platform/coda/coda-bit.c |2 +-
 drivers/media/platform/coda/coda-common.c  |2 +-
 drivers/media/platform/coda/coda.h |2 +-
 drivers/media/platform/coda/trace.h|2 +-
 drivers/media/platform/exynos-gsc/gsc-core.h   |2 +-
 drivers/media/platform/exynos4-is/fimc-capture.c   |2 +-
 drivers/media/platform/exynos4-is/fimc-core.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-core.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-is.h|2 +-
 drivers/media/platform/exynos4-is/fimc-isp-video.c |2 +-
 drivers/media/platform/exynos4-is/fimc-isp-video.h |2 +-
 drivers/media/platform/exynos4-is/fimc-isp.h   |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.c  |2 +-
 drivers/media/platform/exynos4-is/fimc-lite.h  |2 +-
 drivers/media/platform/exynos4-is/fimc-m2m.c   |2 +-
 drivers/media/platform/marvell-ccic/mcam-core.h|2 +-
 drivers/media/platform/omap3isp/ispvideo.h |2 +-
 drivers/media/platform/s3c-camif/camif-capture.c   |2 +-
 drivers/media/platform/s3c-camif/camif-core.c  |2 +-
 drivers/media/platform/s3c-camif/camif-core.h  |2 +-
 drivers/media/platform/s5p-g2d/g2d.c   |2 +-
 drivers/media/platform/s5p-jpeg/jpeg-core.c|2 +-
 drivers/media/platform/s5p-mfc/s5p_mfc.c   |2 +-
 drivers/media/platform/s5p-mfc/s5p_mfc_common.h|2 +-
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c   |2 +-
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c   |2 +-
 drivers/media/platform/s5p-tv/mixer.h  |2 +-
 drivers/media/platform/soc_camera/mx2_camera.c |2 +-
 drivers/media/platform/soc_camera/soc_camera.c |2 +-
 drivers/media/platform/ti-vpe/vpe.c|2 +-
 drivers/media/platform/vivid/vivid-core.h  |2 +-
 drivers/media/platform/vsp1/vsp1_video.c   |2 +-
 drivers/media/platform/vsp1/vsp1_video.h   |2 +-
 drivers/media/platform/xilinx/xilinx-dma.c |2 +-
 drivers/media/platform/xilinx/xilinx-dma.h |2 +-
 drivers/media/usb/go7007/go7007-priv.h |2 +-
 drivers/media/usb/stk1160/stk1160.h|2 +-
 drivers/media/usb/usbtv/usbtv-video.c  |2 +-
 drivers/media/usb/uvc/uvcvideo.h   |2 +-
 drivers/media/v4l2-core/Makefile   |2 +-
 drivers/media/v4l2-core/v4l2-ioctl.c   |2 +-
 drivers/media/v4l2-core/v4l2-mem2mem.c |2 +-
 drivers/media/v4l2-core/videobuf2-dma-contig.c |2 +-
 drivers/media/v4l2-core/videobuf2-dma-sg.c |2 +-
 drivers/media/v4l2-core/videobuf2-memops.c |2 +-
 .../{videobuf2-core.c = videobuf2-v4l2.c} |   10 +-
 drivers/media/v4l2-core/videobuf2-vmalloc.c|2 +-
 drivers/usb/gadget/function/uvc_queue.h|2 +-
 include/media/soc_camera.h |2 +-
 include/media/v4l2-mem2mem.h   |2 +-
 include/media/videobuf2-dma-contig.h   |2 +-
 include/media/videobuf2-dma-sg.h   |2 +-
 include/media/videobuf2-dvb.h  |2 +-
 include/media/videobuf2-memops.h   |2 +-
 .../media/{videobuf2-core.h = videobuf2-v4l2.h}   |2 +-
 include/media/videobuf2-vmalloc.h  |2 +-
 57 files changed, 61 insertions(+), 61 deletions(-)
 rename drivers/media/v4l2-core/{videobuf2-core.c = videobuf2-v4l2.c} (99%)
 rename include/media/{videobuf2-core.h = videobuf2-v4l2.h} (99%)

diff --git a/drivers/media/pci/solo6x10/solo6x10.h 
b/drivers/media/pci/solo6x10/solo6x10.h
index 27423d7..5cc9e9d 100644
--- a/drivers/media/pci/solo6x10/solo6x10.h
+++ b/drivers/media/pci/solo6x10/solo6x10.h
@@ -35,7 +35,7 @@
 #include media/v4l2-dev.h
 #include media/v4l2-device.h
 #include media/v4l2-ctrls.h
-#include media/videobuf2-core.h
+#include media/videobuf2-v4l2.h
 
 #include solo6x10-regs.h
 
diff --git a/drivers/media/platform/coda/coda-bit.c 
b/drivers/media/platform/coda/coda-bit.c
index 3d434a4..d058447