linux/arch/arm
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
..
boot ARM: DT updates for v4.4 2015-11-10 15:06:26 -08:00
common dmaengine updates for 4.4-rc1 2015-11-10 10:05:17 -08:00
configs ARM: SoC defconfig updates for v4.4 2015-11-10 15:08:32 -08:00
crypto
firmware
include ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
kernel ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
kvm arm/arm64: KVM: Improve kvm_exit tracepoint 2015-10-22 23:01:47 +02:00
lib
mach-alpine
mach-asm9260
mach-at91 ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-axxia
mach-bcm ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
mach-footbridge
mach-gemini ARM: gemini: remove unnecessary mdio-gpio includes 2015-10-21 19:50:43 -07:00
mach-highbank
mach-hisi
mach-imx ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-integrator
mach-iop13xx
mach-iop32x
mach-iop33x
mach-ixp4xx
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1
mach-omap2 ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
mach-orion5x ARM: orion5x: use mac_pton() helper 2015-10-23 17:18:22 +02:00
mach-picoxcell
mach-prima2 ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
mach-pxa [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
mach-qcom ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
mach-realview ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
mach-rockchip
mach-rpc
mach-s3c24xx Samsung SoC updates for v4.4 2015-10-26 10:18:41 +09:00
mach-s3c64xx ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-s5pv210
mach-sa1100
mach-shmobile ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-socfpga
mach-spear ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
mach-sti
mach-stm32
mach-sunxi ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-tegra ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-u300 spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
mach-uniphier ARM: uniphier: rework SMP operations to use trampoline code 2015-10-27 09:20:53 +09:00
mach-ux500 ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
mach-versatile
mach-vexpress ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
mach-vt8500
mach-w90x900
mach-zx
mach-zynq
mm ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-20 06:08:27 -07:00
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-samsung
plat-versatile
probes
tools
vdso ARM: 8449/1: fix bug in vdsomunge swab32 macro 2015-10-29 15:20:15 +00:00
vfp
xen mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
Kconfig ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
Kconfig-nommu
Kconfig.debug ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
Makefile