From b5dcee225ce972fecb054e104be22b2a6f65303d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 10 Nov 2015 12:01:44 -0200 Subject: [media] include/media: split I2C headers from V4L2 core Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes harder to identify what core headers should be documented and what headers belong to I2C drivers that are included only by bridge/main drivers that would require the functions provided by them. Let's move those i2c specific files to its own subdirectory. The files to move were produced via the following script: mkdir include/media/i2c (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done And the references corrected via this script: MAIN_DIR="media/" PREV_DIR="media/" DIRS="i2c/" 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 Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c. Signed-off-by: Mauro Carvalho Chehab Acked-by: Arnd Bergmann --- arch/arm/mach-davinci/board-da850-evm.c | 4 ++-- arch/arm/mach-davinci/board-dm355-evm.c | 2 +- arch/arm/mach-davinci/board-dm365-evm.c | 4 ++-- arch/arm/mach-davinci/board-dm644x-evm.c | 2 +- arch/arm/mach-davinci/board-dm646x-evm.c | 4 ++-- arch/arm/mach-pxa/pcm990-baseboard.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 1ed545cc2b83..9cc7b818fbf6 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -49,8 +49,8 @@ #include #include -#include -#include +#include +#include #define DA850_EVM_PHY_ID "davinci_mdio-0:00" #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index b46b4d25f93e..c71dd9982f03 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index a756003595e9..f073518f621a 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -40,8 +40,8 @@ #include #include -#include -#include +#include +#include #include "davinci.h" diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index bbdd2d614b49..7a20507a3eef 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 846a84ddc28e..ee6ab7e8d3b0 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index b71c96f614f9..e3b58cb84c06 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include -- cgit v1.2.3 From eb4b0ec75ec34e90bd1594c665f16de0cb4e3bf9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 16 Nov 2015 08:35:53 -0200 Subject: [media] include/media: move platform_data to linux/platform_data/media Let's not mix platform_data headers with the core headers. Instead, let's create a subdir at linux/platform_data and move the headers to that common place, adding it to MAINTAINERS. The headers were moved with: mkdir include/linux/platform_data/media/; git mv include/media/gpio-ir-recv.h include/media/ir-rx51.h include/media/mmp-camera.h include/media/omap1_camera.h include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h include/media/soc_camera_platform.h include/media/timb_radio.h include/media/timb_video.h include/linux/platform_data/media/ And the references fixed with this script: MAIN_DIR="linux/platform_data/" PREV_DIR="media/" DIRS="media/" 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 Acked-by: Arnd Bergmann Acked-by: Lee Jones Acked-by: Krzysztof Kozlowski --- Documentation/video4linux/omap4_camera.txt | 2 +- Documentation/video4linux/si4713.txt | 2 +- MAINTAINERS | 1 + arch/arm/mach-omap1/include/mach/camera.h | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 +- arch/arm/plat-samsung/devs.c | 2 +- arch/sh/boards/mach-ap325rxa/setup.c | 2 +- drivers/media/platform/marvell-ccic/mmp-driver.c | 2 +- drivers/media/platform/s5p-tv/hdmi_drv.c | 2 +- drivers/media/platform/s5p-tv/sii9234_drv.c | 2 +- drivers/media/platform/soc_camera/omap1_camera.c | 2 +- .../platform/soc_camera/soc_camera_platform.c | 2 +- drivers/media/platform/timblogiw.c | 2 +- drivers/media/radio/radio-timb.c | 2 +- drivers/media/radio/si4713/radio-usb-si4713.c | 2 +- drivers/media/radio/si4713/si4713.h | 2 +- drivers/media/rc/gpio-ir-recv.c | 2 +- drivers/media/rc/ir-rx51.c | 2 +- drivers/mfd/timberdale.c | 4 +- drivers/staging/media/omap4iss/iss.h | 2 +- drivers/staging/media/omap4iss/iss_csiphy.h | 2 +- include/linux/platform_data/media/gpio-ir-recv.h | 23 ++++++ include/linux/platform_data/media/ir-rx51.h | 10 +++ include/linux/platform_data/media/mmp-camera.h | 9 +++ include/linux/platform_data/media/omap1_camera.h | 35 +++++++++ include/linux/platform_data/media/omap4iss.h | 65 +++++++++++++++++ include/linux/platform_data/media/s5p_hdmi.h | 36 ++++++++++ include/linux/platform_data/media/si4713.h | 48 +++++++++++++ include/linux/platform_data/media/sii9234.h | 24 +++++++ .../platform_data/media/soc_camera_platform.h | 83 ++++++++++++++++++++++ include/linux/platform_data/media/timb_radio.h | 30 ++++++++ include/linux/platform_data/media/timb_video.h | 33 +++++++++ include/media/gpio-ir-recv.h | 24 ------- include/media/ir-rx51.h | 10 --- include/media/mmp-camera.h | 9 --- include/media/omap1_camera.h | 35 --------- include/media/omap4iss.h | 65 ----------------- include/media/s5p_hdmi.h | 37 ---------- include/media/si4713.h | 48 ------------- include/media/sii9234.h | 24 ------- include/media/soc_camera_platform.h | 83 ---------------------- include/media/timb_radio.h | 30 -------- include/media/timb_video.h | 33 --------- 43 files changed, 419 insertions(+), 420 deletions(-) create mode 100644 include/linux/platform_data/media/gpio-ir-recv.h create mode 100644 include/linux/platform_data/media/ir-rx51.h create mode 100644 include/linux/platform_data/media/mmp-camera.h create mode 100644 include/linux/platform_data/media/omap1_camera.h create mode 100644 include/linux/platform_data/media/omap4iss.h create mode 100644 include/linux/platform_data/media/s5p_hdmi.h create mode 100644 include/linux/platform_data/media/si4713.h create mode 100644 include/linux/platform_data/media/sii9234.h create mode 100644 include/linux/platform_data/media/soc_camera_platform.h create mode 100644 include/linux/platform_data/media/timb_radio.h create mode 100644 include/linux/platform_data/media/timb_video.h delete mode 100644 include/media/gpio-ir-recv.h delete mode 100644 include/media/ir-rx51.h delete mode 100644 include/media/mmp-camera.h delete mode 100644 include/media/omap1_camera.h delete mode 100644 include/media/omap4iss.h delete mode 100644 include/media/s5p_hdmi.h delete mode 100644 include/media/si4713.h delete mode 100644 include/media/sii9234.h delete mode 100644 include/media/soc_camera_platform.h delete mode 100644 include/media/timb_radio.h delete mode 100644 include/media/timb_video.h (limited to 'arch/arm') diff --git a/Documentation/video4linux/omap4_camera.txt b/Documentation/video4linux/omap4_camera.txt index 25d9b40a4651..a6734aa77242 100644 --- a/Documentation/video4linux/omap4_camera.txt +++ b/Documentation/video4linux/omap4_camera.txt @@ -47,7 +47,7 @@ Tested platforms File list --------- drivers/staging/media/omap4iss/ -include/media/omap4iss.h +include/linux/platform_data/media/omap4iss.h References ---------- diff --git a/Documentation/video4linux/si4713.txt b/Documentation/video4linux/si4713.txt index 2e7392a4fee1..2ddc6b095a76 100644 --- a/Documentation/video4linux/si4713.txt +++ b/Documentation/video4linux/si4713.txt @@ -157,7 +157,7 @@ int main (int argc, char *argv[]) } The struct si4713_rnl and SI4713_IOC_MEASURE_RNL are defined under -include/media/si4713.h. +include/linux/platform_data/media/si4713.h. Stereo/Mono and RDS subchannels =============================== diff --git a/MAINTAINERS b/MAINTAINERS index dc1787719c2a..96521eb39270 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6895,6 +6895,7 @@ F: Documentation/video4linux/ F: Documentation/DocBook/media/ F: drivers/media/ F: drivers/staging/media/ +F: include/linux/platform_data/media/ F: include/media/ F: include/uapi/linux/dvb/ F: include/uapi/linux/videodev2.h diff --git a/arch/arm/mach-omap1/include/mach/camera.h b/arch/arm/mach-omap1/include/mach/camera.h index 847d00f0bb0a..caa6c0d6f0ac 100644 --- a/arch/arm/mach-omap1/include/mach/camera.h +++ b/arch/arm/mach-omap1/include/mach/camera.h @@ -1,7 +1,7 @@ #ifndef __ASM_ARCH_CAMERA_H_ #define __ASM_ARCH_CAMERA_H_ -#include +#include void omap1_camera_init(void *); diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 14edcd7a2a1d..0a0567f8e8a0 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include @@ -48,7 +48,7 @@ #include