linux/arch/sh/boards
Mauro Carvalho Chehab b5dcee225c [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 <mchehab@osg.samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-11-17 06:57:11 -02:00
..
mach-ap325rxa [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-cayman sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-dreamcast sh: dreamcast: Migrate off of deprecated dynamic IRQ API. 2012-05-18 23:36:44 +09:00
mach-ecovec24 [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-highlander sh: mach-highlander/psw.c is tristate and should use module.h 2015-06-16 14:12:26 -04:00
mach-hp6xx sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-kfr2r09 [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-landisk sh: don't use module_init in non-modular psw.c code 2015-06-16 14:12:31 -04:00
mach-lboxre2 sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-microdev sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-migor [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-r2d sh: Use device_initcall() instead of __initcall() 2011-01-11 12:47:45 +09:00
mach-rsk sh: mach-rsk: remove unnecessary MTD partition probe specification 2015-09-30 13:51:35 -07:00
mach-sdk7780 sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-sdk7786 sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB 2013-03-20 22:48:15 +09:00
mach-se [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-sh03 sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
mach-sh7763rdp sh_eth: remove 'register_type' field from 'struct sh_eth_plat_data' 2013-08-20 17:10:41 -07:00
mach-x3proto genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
board-apsh4a3a.c sh: add fixed voltage regulators to apsh4a3a 2012-06-28 18:00:46 +09:00
board-apsh4ad0a.c sh: add fixed voltage regulators to apsh4ad0a 2012-06-28 18:00:47 +09:00
board-edosk7705.c sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
board-edosk7760.c sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
board-espt.c sh_eth: remove 'register_type' field from 'struct sh_eth_plat_data' 2013-08-20 17:10:41 -07:00
board-magicpanelr2.c sh: add fixed voltage regulators to magicpanelr2 2012-06-28 18:00:48 +09:00
board-polaris.c Merge branches 'sh/urgent' and 'sh/regulator' into sh-latest 2012-07-25 13:13:09 +09:00
board-secureedge5410.c sh: Kill off machvec IRQ hinting. 2012-05-21 17:54:01 +09:00
board-sh2007.c sh: add fixed voltage regulators to sh2007 2012-06-28 18:00:52 +09:00
board-sh7757lcr.c mmc: sh_mobile_sdhi: remove sh_mobile_sdhi_info 2015-03-05 21:54:26 +05:30
board-sh7785lcr.c sh: sh7785lcr evt2irq migration. 2012-05-18 15:42:07 +09:00
board-shmin.c sh: Mass ctrl_in/outX to __raw_read/writeX conversion. 2010-01-26 12:58:40 +09:00
board-titan.c sh: mach-titan: Kill off unused PIO port mangling. 2010-01-28 15:08:21 +09:00
board-urquell.c sh: urquell evt2irq migration. 2012-05-18 15:43:48 +09:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-08-06 21:03:53 -07:00
Makefile sh: Add support for AP-SH4AD-0A board. 2011-01-13 18:36:21 +09:00