Commit 7e0a16f6118a297dd467c1e5a0908429fcdf56af

Authored by Mauro Carvalho Chehab
1 parent 42d12f5aa1

V4L/DVB (10907): avoid loading the entire videodev.h header on V4L2 drivers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Showing 16 changed files with 27 additions and 27 deletions Side-by-side Diff

drivers/media/video/bt8xx/bttv.h
... ... @@ -14,7 +14,7 @@
14 14 #ifndef _BTTV_H_
15 15 #define _BTTV_H_
16 16  
17   -#include <linux/videodev.h>
  17 +#include <linux/videodev2.h>
18 18 #include <linux/i2c.h>
19 19 #include <media/ir-common.h>
20 20 #include <media/ir-kbd-i2c.h>
drivers/media/video/bt8xx/bttvp.h
... ... @@ -32,7 +32,6 @@
32 32 #include <linux/wait.h>
33 33 #include <linux/i2c.h>
34 34 #include <linux/i2c-algo-bit.h>
35   -#include <linux/videodev.h>
36 35 #include <linux/pci.h>
37 36 #include <linux/input.h>
38 37 #include <linux/mutex.h>
drivers/media/video/cpia2/cpia2_v4l.c
... ... @@ -37,6 +37,7 @@
37 37 #include <linux/sched.h>
38 38 #include <linux/slab.h>
39 39 #include <linux/init.h>
  40 +#include <linux/videodev.h>
40 41 #include <media/v4l2-ioctl.h>
41 42  
42 43 #include "cpia2.h"
drivers/media/video/cx23885/cx23885-video.c
... ... @@ -35,11 +35,6 @@
35 35 #include <media/v4l2-common.h>
36 36 #include <media/v4l2-ioctl.h>
37 37  
38   -#ifdef CONFIG_VIDEO_V4L1_COMPAT
39   -/* Include V4L1 specific functions. Should be removed soon */
40   -#include <linux/videodev.h>
41   -#endif
42   -
43 38 MODULE_DESCRIPTION("v4l2 driver module for cx23885 based TV cards");
44 39 MODULE_AUTHOR("Steven Toth <stoth@linuxtv.org>");
45 40 MODULE_LICENSE("GPL");
drivers/media/video/cx88/cx88-video.c
... ... @@ -41,11 +41,6 @@
41 41 #include <media/v4l2-common.h>
42 42 #include <media/v4l2-ioctl.h>
43 43  
44   -#ifdef CONFIG_VIDEO_V4L1_COMPAT
45   -/* Include V4L1 specific functions. Should be removed soon */
46   -#include <linux/videodev.h>
47   -#endif
48   -
49 44 MODULE_DESCRIPTION("v4l2 driver module for cx2388x based TV cards");
50 45 MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
51 46 MODULE_LICENSE("GPL");
drivers/media/video/msp3400-driver.c
... ... @@ -53,7 +53,7 @@
53 53 #include <linux/i2c.h>
54 54 #include <linux/kthread.h>
55 55 #include <linux/freezer.h>
56   -#include <linux/videodev2.h>
  56 +#include <linux/videodev.h>
57 57 #include <media/v4l2-device.h>
58 58 #include <media/v4l2-ioctl.h>
59 59 #include <media/v4l2-i2c-drv-legacy.h>
drivers/media/video/ov7670.c
... ... @@ -14,7 +14,7 @@
14 14 #include <linux/module.h>
15 15 #include <linux/slab.h>
16 16 #include <linux/delay.h>
17   -#include <linux/videodev.h>
  17 +#include <linux/videodev2.h>
18 18 #include <media/v4l2-common.h>
19 19 #include <media/v4l2-chip-ident.h>
20 20 #include <linux/i2c.h>
drivers/media/video/saa7134/saa7134-video.c
... ... @@ -31,11 +31,6 @@
31 31 #include "saa7134.h"
32 32 #include <media/v4l2-common.h>
33 33  
34   -#ifdef CONFIG_VIDEO_V4L1_COMPAT
35   -/* Include V4L1 specific functions. Should be removed soon */
36   -#include <linux/videodev.h>
37   -#endif
38   -
39 34 /* ------------------------------------------------------------------ */
40 35  
41 36 unsigned int video_debug;
drivers/media/video/saa7146.h
... ... @@ -25,8 +25,6 @@
25 25 #include <linux/types.h>
26 26 #include <linux/wait.h>
27 27  
28   -#include <linux/videodev.h>
29   -
30 28 #ifndef O_NONCAP
31 29 #define O_NONCAP O_TRUNC
32 30 #endif
drivers/media/video/v4l2-ioctl.c
... ... @@ -17,6 +17,7 @@
17 17 #include <linux/kernel.h>
18 18  
19 19 #define __OLD_VIDIOC_ /* To allow fixing old calls */
  20 +#include <linux/videodev.h>
20 21 #include <linux/videodev2.h>
21 22  
22 23 #ifdef CONFIG_VIDEO_V4L1
drivers/media/video/vivi.c
... ... @@ -28,10 +28,6 @@
28 28 #include <linux/mutex.h>
29 29 #include <linux/videodev2.h>
30 30 #include <linux/dma-mapping.h>
31   -#ifdef CONFIG_VIDEO_V4L1_COMPAT
32   -/* Include V4L1 specific functions. Should be removed soon */
33   -#include <linux/videodev.h>
34   -#endif
35 31 #include <linux/interrupt.h>
36 32 #include <linux/kthread.h>
37 33 #include <linux/highmem.h>
drivers/media/video/w9966.c
... ... @@ -57,7 +57,7 @@
57 57 #include <linux/module.h>
58 58 #include <linux/init.h>
59 59 #include <linux/delay.h>
60   -#include <linux/videodev2.h>
  60 +#include <linux/videodev.h>
61 61 #include <media/v4l2-common.h>
62 62 #include <media/v4l2-ioctl.h>
63 63 #include <linux/parport.h>
drivers/media/video/w9968cf.c
... ... @@ -42,6 +42,7 @@
42 42 #include <asm/page.h>
43 43 #include <asm/uaccess.h>
44 44 #include <linux/page-flags.h>
  45 +#include <linux/videodev.h>
45 46 #include <media/v4l2-ioctl.h>
46 47  
47 48 #include "w9968cf.h"
drivers/media/video/zoran/zoran_driver.c
... ... @@ -59,7 +59,7 @@
59 59  
60 60 #include <linux/spinlock.h>
61 61  
62   -#include <linux/videodev2.h>
  62 +#include <linux/videodev.h>
63 63 #include <media/v4l2-common.h>
64 64 #include <media/v4l2-ioctl.h>
65 65 #include "videocodec.h"
include/linux/videodev.h
... ... @@ -16,6 +16,23 @@
16 16 #include <linux/ioctl.h>
17 17 #include <linux/videodev2.h>
18 18  
  19 +#if defined(__MIN_V4L1) && defined (__KERNEL__)
  20 +
  21 +/*
  22 + * Used by those V4L2 core functions that need a minimum V4L1 support,
  23 + * in order to allow V4L1 Compatibilty code compilation.
  24 + */
  25 +
  26 +struct video_mbuf
  27 +{
  28 + int size; /* Total memory to map */
  29 + int frames; /* Frames */
  30 + int offsets[VIDEO_MAX_FRAME];
  31 +};
  32 +
  33 +#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
  34 +
  35 +#else
19 36 #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
20 37  
21 38 #define VID_TYPE_CAPTURE 1 /* Can capture */
... ... @@ -312,6 +329,7 @@
312 329 #define VID_PLAY_END_MARK 14
313 330  
314 331 #endif /* CONFIG_VIDEO_V4L1_COMPAT */
  332 +#endif /* __MIN_V4L1 */
315 333  
316 334 #endif /* __LINUX_VIDEODEV_H */
317 335  
include/media/v4l2-ioctl.h
... ... @@ -15,6 +15,7 @@
15 15 #include <linux/mutex.h>
16 16 #include <linux/compiler.h> /* need __user */
17 17 #ifdef CONFIG_VIDEO_V4L1_COMPAT
  18 +#define __MIN_V4L1
18 19 #include <linux/videodev.h>
19 20 #else
20 21 #include <linux/videodev2.h>