[media] include/media: move driver interface headers to a separate dir
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 13 Nov 2015 21:40:07 +0000 (19:40 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 17 Nov 2015 08:57:29 +0000 (06:57 -0200)
commitd647f0b70ce2b4aeb443639dc92b2d859da697a7
tree171506fbb7f0eeadfdbc5c9c2256bd08e3a70e44
parentb5dcee225ce972fecb054e104be22b2a6f65303d
[media] include/media: move driver interface headers to a separate dir

Let's not mix headers used by the core with those headers that
are needed by some driver-specific interface header.

The headers used on drivers were manually moved using:
    mkdir include/media/drv-intf/
    git mv include/media/cx2341x.h include/media/cx25840.h \
include/media/exynos-fimc.h include/media/msp3400.h \
include/media/s3c_camif.h include/media/saa7146.h \
include/media/saa7146_vv.h  include/media/sh_mobile_ceu.h \
include/media/sh_mobile_csi2.h include/media/sh_vou.h \
include/media/si476x.h include/media/soc_mediabus.h \
include/media/tea575x.h include/media/drv-intf/

And the references for those headers were corrected using:

    MAIN_DIR="media/"
    PREV_DIR="media/"
    DIRS="drv-intf/"

    echo "Checking affected files" >&2
    for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
 n=`basename $j`
git grep -l $n
done
    done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done";
);
echo "Handling documentation..." >&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "  perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
    ) >script && . ./script

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
111 files changed:
MAINTAINERS
arch/sh/boards/mach-ap325rxa/setup.c
arch/sh/boards/mach-ecovec24/setup.c
arch/sh/boards/mach-kfr2r09/setup.c
arch/sh/boards/mach-migor/setup.c
arch/sh/boards/mach-se/7724/setup.c
drivers/media/common/cx2341x.c
drivers/media/common/saa7146/saa7146_core.c
drivers/media/common/saa7146/saa7146_fops.c
drivers/media/common/saa7146/saa7146_hlp.c
drivers/media/common/saa7146/saa7146_i2c.c
drivers/media/common/saa7146/saa7146_vbi.c
drivers/media/common/saa7146/saa7146_video.c
drivers/media/i2c/cx25840/cx25840-audio.c
drivers/media/i2c/cx25840/cx25840-core.c
drivers/media/i2c/cx25840/cx25840-firmware.c
drivers/media/i2c/cx25840/cx25840-ir.c
drivers/media/i2c/cx25840/cx25840-vbi.c
drivers/media/i2c/m5mols/m5mols_capture.c
drivers/media/i2c/msp3400-driver.c
drivers/media/i2c/msp3400-driver.h
drivers/media/i2c/msp3400-kthreads.c
drivers/media/i2c/soc_camera/mt9m001.c
drivers/media/i2c/soc_camera/mt9v022.c
drivers/media/pci/bt8xx/bttv-driver.c
drivers/media/pci/bt8xx/bttvp.h
drivers/media/pci/cx18/cx23418.h
drivers/media/pci/cx23885/cx23885-417.c
drivers/media/pci/cx23885/cx23885-cards.c
drivers/media/pci/cx23885/cx23885-video.c
drivers/media/pci/cx23885/cx23885.h
drivers/media/pci/cx88/cx88-blackbird.c
drivers/media/pci/cx88/cx88.h
drivers/media/pci/ivtv/ivtv-cards.c
drivers/media/pci/ivtv/ivtv-driver.h
drivers/media/pci/ivtv/ivtv-i2c.c
drivers/media/pci/ivtv/ivtv-routing.c
drivers/media/pci/saa7146/hexium_gemini.c
drivers/media/pci/saa7146/hexium_orion.c
drivers/media/pci/saa7146/mxb.c
drivers/media/pci/ttpci/av7110.h
drivers/media/pci/ttpci/budget-av.c
drivers/media/pci/ttpci/budget.h
drivers/media/platform/exynos4-is/common.c
drivers/media/platform/exynos4-is/fimc-core.h
drivers/media/platform/exynos4-is/fimc-isp-video.c
drivers/media/platform/exynos4-is/fimc-isp.h
drivers/media/platform/exynos4-is/fimc-lite-reg.c
drivers/media/platform/exynos4-is/fimc-lite.c
drivers/media/platform/exynos4-is/fimc-lite.h
drivers/media/platform/exynos4-is/fimc-reg.c
drivers/media/platform/exynos4-is/media-dev.c
drivers/media/platform/exynos4-is/media-dev.h
drivers/media/platform/exynos4-is/mipi-csis.c
drivers/media/platform/s3c-camif/camif-core.h
drivers/media/platform/s3c-camif/camif-regs.h
drivers/media/platform/sh_vou.c
drivers/media/platform/soc_camera/atmel-isi.c
drivers/media/platform/soc_camera/mx2_camera.c
drivers/media/platform/soc_camera/mx3_camera.c
drivers/media/platform/soc_camera/omap1_camera.c
drivers/media/platform/soc_camera/pxa_camera.c
drivers/media/platform/soc_camera/rcar_vin.c
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
drivers/media/platform/soc_camera/sh_mobile_csi2.c
drivers/media/platform/soc_camera/soc_camera.c
drivers/media/platform/soc_camera/soc_mediabus.c
drivers/media/radio/radio-maxiradio.c
drivers/media/radio/radio-sf16fmr2.c
drivers/media/radio/radio-shark.c
drivers/media/radio/radio-si476x.c
drivers/media/radio/tea575x.c
drivers/media/usb/cx231xx/cx231xx-417.c
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/cx231xx/cx231xx-vbi.c
drivers/media/usb/cx231xx/cx231xx-video.c
drivers/media/usb/cx231xx/cx231xx.h
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/usb/pvrusb2/pvrusb2-audio.c
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
drivers/media/usb/pvrusb2/pvrusb2-hdw-internal.h
include/media/cx2341x.h [deleted file]
include/media/cx25840.h [deleted file]
include/media/drv-intf/cx2341x.h [new file with mode: 0644]
include/media/drv-intf/cx25840.h [new file with mode: 0644]
include/media/drv-intf/exynos-fimc.h [new file with mode: 0644]
include/media/drv-intf/msp3400.h [new file with mode: 0644]
include/media/drv-intf/s3c_camif.h [new file with mode: 0644]
include/media/drv-intf/saa7146.h [new file with mode: 0644]
include/media/drv-intf/saa7146_vv.h [new file with mode: 0644]
include/media/drv-intf/sh_mobile_ceu.h [new file with mode: 0644]
include/media/drv-intf/sh_mobile_csi2.h [new file with mode: 0644]
include/media/drv-intf/sh_vou.h [new file with mode: 0644]
include/media/drv-intf/si476x.h [new file with mode: 0644]
include/media/drv-intf/soc_mediabus.h [new file with mode: 0644]
include/media/drv-intf/tea575x.h [new file with mode: 0644]
include/media/exynos-fimc.h [deleted file]
include/media/msp3400.h [deleted file]
include/media/s3c_camif.h [deleted file]
include/media/saa7146.h [deleted file]
include/media/saa7146_vv.h [deleted file]
include/media/sh_mobile_ceu.h [deleted file]
include/media/sh_mobile_csi2.h [deleted file]
include/media/sh_vou.h [deleted file]
include/media/si476x.h [deleted file]
include/media/soc_mediabus.h [deleted file]
include/media/tea575x.h [deleted file]
include/uapi/linux/v4l2-controls.h
sound/pci/es1968.c
sound/pci/fm801.c