diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-10 15:01:44 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-11-17 09:57:11 +0100 |
commit | b5dcee225ce972fecb054e104be22b2a6f65303d (patch) | |
tree | 0f83e95abde14960d263eb79f478984bcf81f03d /drivers/media/pci | |
parent | [media] bz#75751: Move internal header file lirc.h to uapi/ (diff) | |
download | linux-b5dcee225ce972fecb054e104be22b2a6f65303d.tar.xz linux-b5dcee225ce972fecb054e104be22b2a6f65303d.zip |
[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>
Diffstat (limited to 'drivers/media/pci')
22 files changed, 32 insertions, 32 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-cards.c b/drivers/media/pci/bt8xx/bttv-cards.c index 4654fb65ca21..7a081023d751 100644 --- a/drivers/media/pci/bt8xx/bttv-cards.c +++ b/drivers/media/pci/bt8xx/bttv-cards.c @@ -41,7 +41,7 @@ #include "bttvp.h" #include <media/v4l2-common.h> -#include <media/tvaudio.h> +#include <media/i2c/tvaudio.h> #include "bttv-audio-hook.h" /* fwd decl */ diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 15a4ebc2844d..3f40606a60a7 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -50,7 +50,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-event.h> -#include <media/tvaudio.h> +#include <media/i2c/tvaudio.h> #include <media/msp3400.h> #include <linux/dma-mapping.h> @@ -58,7 +58,7 @@ #include <asm/io.h> #include <asm/byteorder.h> -#include <media/saa6588.h> +#include <media/i2c/saa6588.h> #define BTTV_VERSION "0.9.19" diff --git a/drivers/media/pci/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h index 31bf79d3b0d2..28a02cd0fccd 100644 --- a/drivers/media/pci/bt8xx/bttvp.h +++ b/drivers/media/pci/bt8xx/bttvp.h @@ -41,7 +41,7 @@ #include <media/videobuf-dma-sg.h> #include <media/tveeprom.h> #include <media/rc-core.h> -#include <media/ir-kbd-i2c.h> +#include <media/i2c/ir-kbd-i2c.h> #include <media/tea575x.h> #include "bt848.h" diff --git a/drivers/media/pci/cobalt/cobalt-driver.c b/drivers/media/pci/cobalt/cobalt-driver.c index 8fed61ec712e..8d6f04fc8013 100644 --- a/drivers/media/pci/cobalt/cobalt-driver.c +++ b/drivers/media/pci/cobalt/cobalt-driver.c @@ -21,9 +21,9 @@ */ #include <linux/delay.h> -#include <media/adv7604.h> -#include <media/adv7842.h> -#include <media/adv7511.h> +#include <media/i2c/adv7604.h> +#include <media/i2c/adv7842.h> +#include <media/i2c/adv7511.h> #include <media/v4l2-event.h> #include <media/v4l2-ctrls.h> diff --git a/drivers/media/pci/cobalt/cobalt-irq.c b/drivers/media/pci/cobalt/cobalt-irq.c index 3de26d0714b5..c30748e76164 100644 --- a/drivers/media/pci/cobalt/cobalt-irq.c +++ b/drivers/media/pci/cobalt/cobalt-irq.c @@ -18,7 +18,7 @@ * SOFTWARE. */ -#include <media/adv7604.h> +#include <media/i2c/adv7604.h> #include "cobalt-driver.h" #include "cobalt-irq.h" diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index ff46e424262f..b1cb061be68d 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -29,8 +29,8 @@ #include <media/v4l2-ctrls.h> #include <media/v4l2-event.h> #include <media/v4l2-dv-timings.h> -#include <media/adv7604.h> -#include <media/adv7842.h> +#include <media/i2c/adv7604.h> +#include <media/i2c/adv7842.h> #include "cobalt-alsa.h" #include "cobalt-cpld.h" diff --git a/drivers/media/pci/cx18/cx18-cards.c b/drivers/media/pci/cx18/cx18-cards.c index c07c849b1aaf..5e01ea441dc4 100644 --- a/drivers/media/pci/cx18/cx18-cards.c +++ b/drivers/media/pci/cx18/cx18-cards.c @@ -26,7 +26,7 @@ #include "cx18-cards.h" #include "cx18-av-core.h" #include "cx18-i2c.h" -#include <media/cs5345.h> +#include <media/i2c/cs5345.h> #define V4L2_STD_PAL_SECAM (V4L2_STD_PAL|V4L2_STD_SECAM) diff --git a/drivers/media/pci/cx18/cx18-driver.h b/drivers/media/pci/cx18/cx18-driver.h index b15beed2dc14..7e31f2a2e085 100644 --- a/drivers/media/pci/cx18/cx18-driver.h +++ b/drivers/media/pci/cx18/cx18-driver.h @@ -49,7 +49,7 @@ #include <media/v4l2-device.h> #include <media/v4l2-fh.h> #include <media/tuner.h> -#include <media/ir-kbd-i2c.h> +#include <media/i2c/ir-kbd-i2c.h> #include "cx18-mailbox.h" #include "cx18-av-core.h" #include "cx23418.h" diff --git a/drivers/media/pci/cx88/cx88-alsa.c b/drivers/media/pci/cx88/cx88-alsa.c index 0ed1b6530374..0f5f093c8867 100644 --- a/drivers/media/pci/cx88/cx88-alsa.c +++ b/drivers/media/pci/cx88/cx88-alsa.c @@ -40,7 +40,7 @@ #include <sound/control.h> #include <sound/initval.h> #include <sound/tlv.h> -#include <media/wm8775.h> +#include <media/i2c/wm8775.h> #include "cx88.h" #include "cx88-reg.h" diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 0de1ad5a977d..726c5b82b006 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -41,7 +41,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-event.h> -#include <media/wm8775.h> +#include <media/i2c/wm8775.h> MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards"); MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h index 2996eb3ea1fc..d81b26ee89df 100644 --- a/drivers/media/pci/cx88/cx88.h +++ b/drivers/media/pci/cx88/cx88.h @@ -32,8 +32,8 @@ #include <media/videobuf2-dma-sg.h> #include <media/cx2341x.h> #include <media/videobuf2-dvb.h> -#include <media/ir-kbd-i2c.h> -#include <media/wm8775.h> +#include <media/i2c/ir-kbd-i2c.h> +#include <media/i2c/wm8775.h> #include "cx88-reg.h" #include "tuner-xc2028.h" diff --git a/drivers/media/pci/ivtv/ivtv-cards.c b/drivers/media/pci/ivtv/ivtv-cards.c index 145e4749a69d..9eb964c9f593 100644 --- a/drivers/media/pci/ivtv/ivtv-cards.c +++ b/drivers/media/pci/ivtv/ivtv-cards.c @@ -23,11 +23,11 @@ #include "ivtv-i2c.h" #include <media/msp3400.h> -#include <media/m52790.h> -#include <media/wm8775.h> -#include <media/cs53l32a.h> +#include <media/i2c/m52790.h> +#include <media/i2c/wm8775.h> +#include <media/i2c/cs53l32a.h> #include <media/cx25840.h> -#include <media/upd64031a.h> +#include <media/i2c/upd64031a.h> #define MSP_TUNER MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, \ MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER) diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 2bb10cd9ecfd..374033a5bdaf 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -57,7 +57,7 @@ #include "ivtv-gpio.h" #include <linux/dma-mapping.h> #include <media/tveeprom.h> -#include <media/saa7115.h> +#include <media/i2c/saa7115.h> #include "tuner-xc2028.h" /* If you have already X v4l cards, then set this to X. This way diff --git a/drivers/media/pci/ivtv/ivtv-driver.h b/drivers/media/pci/ivtv/ivtv-driver.h index ee0ef6e48c7d..e004f56267a6 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.h +++ b/drivers/media/pci/ivtv/ivtv-driver.h @@ -65,7 +65,7 @@ #include <media/v4l2-fh.h> #include <media/tuner.h> #include <media/cx2341x.h> -#include <media/ir-kbd-i2c.h> +#include <media/i2c/ir-kbd-i2c.h> #include <linux/ivtv.h> diff --git a/drivers/media/pci/ivtv/ivtv-fileops.c b/drivers/media/pci/ivtv/ivtv-fileops.c index 605d280d8a5f..c9bd018e53de 100644 --- a/drivers/media/pci/ivtv/ivtv-fileops.c +++ b/drivers/media/pci/ivtv/ivtv-fileops.c @@ -34,7 +34,7 @@ #include "ivtv-cards.h" #include "ivtv-firmware.h" #include <media/v4l2-event.h> -#include <media/saa7115.h> +#include <media/i2c/saa7115.h> /* This function tries to claim the stream for a specific file descriptor. If no one else is using this stream then the stream is claimed and diff --git a/drivers/media/pci/ivtv/ivtv-firmware.c b/drivers/media/pci/ivtv/ivtv-firmware.c index 4b0e758a7bce..5b3095f65dce 100644 --- a/drivers/media/pci/ivtv/ivtv-firmware.c +++ b/drivers/media/pci/ivtv/ivtv-firmware.c @@ -26,7 +26,7 @@ #include "ivtv-ioctl.h" #include "ivtv-cards.h" #include <linux/firmware.h> -#include <media/saa7127.h> +#include <media/i2c/saa7127.h> #define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE #define IVTV_MASK_VPU_ENABLE15 0xFFFFFFF6 diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 9a21c17fc376..2c54cb824b0b 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -32,7 +32,7 @@ #include "ivtv-gpio.h" #include "ivtv-controls.h" #include "ivtv-cards.h" -#include <media/saa7127.h> +#include <media/i2c/saa7127.h> #include <media/tveeprom.h> #include <media/v4l2-event.h> #include <linux/dvb/audio.h> diff --git a/drivers/media/pci/ivtv/ivtv-routing.c b/drivers/media/pci/ivtv/ivtv-routing.c index 8898c569a1c9..9a07808b61f0 100644 --- a/drivers/media/pci/ivtv/ivtv-routing.c +++ b/drivers/media/pci/ivtv/ivtv-routing.c @@ -25,9 +25,9 @@ #include "ivtv-routing.h" #include <media/msp3400.h> -#include <media/m52790.h> -#include <media/upd64031a.h> -#include <media/upd64083.h> +#include <media/i2c/m52790.h> +#include <media/i2c/upd64031a.h> +#include <media/i2c/upd64083.h> /* Selects the audio input and output according to the current settings. */ diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 518086c7aed5..4d3a7fb6f475 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -32,7 +32,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-event.h> -#include <media/saa6588.h> +#include <media/i2c/saa6588.h> /* ------------------------------------------------------------------ */ diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index 6b6d234f5cab..7cc758294550 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h @@ -42,7 +42,7 @@ #include <media/v4l2-ctrls.h> #include <media/tuner.h> #include <media/rc-core.h> -#include <media/ir-kbd-i2c.h> +#include <media/i2c/ir-kbd-i2c.h> #include <media/videobuf2-dma-sg.h> #include <sound/core.h> #include <sound/pcm.h> diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c index 0ca1e07ae783..04b66327e329 100644 --- a/drivers/media/pci/saa7146/mxb.c +++ b/drivers/media/pci/saa7146/mxb.c @@ -28,7 +28,7 @@ #include <media/saa7146_vv.h> #include <media/tuner.h> #include <media/v4l2-common.h> -#include <media/saa7115.h> +#include <media/i2c/saa7115.h> #include <linux/module.h> #include "tea6415c.h" diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c index 1136d92af642..9d2697f5b455 100644 --- a/drivers/media/pci/zoran/zoran_card.c +++ b/drivers/media/pci/zoran/zoran_card.c @@ -50,7 +50,7 @@ #include <linux/mutex.h> #include <linux/io.h> #include <media/v4l2-common.h> -#include <media/bt819.h> +#include <media/i2c/bt819.h> #include "videocodec.h" #include "zoran.h" |