aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@m1k.net>2006-01-09 12:32:31 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 12:32:31 -0500
commit5e453dc757385ec892a818e4e3b5de027987ced9 (patch)
treec6e5c4ffeb7557c6f3861f39cb4d28532dc3fe39 /drivers/media/video/em28xx
parent37bdfa06b6bbf085b55d64eb5d9ed112418ed5ad (diff)
V4L/DVB (3269): ioctls cleanups.
- Now, all internal ioctls are at v4l2-common.h - removed unused ioctl at saa6752hs.h - all debug ioctl code moved to v4l2-common.c - removed duplicated stuff from other cards Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c53
-rw-r--r--drivers/media/video/em28xx/em28xx-i2c.c1
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/em28xx/em28xx.h2
4 files changed, 2 insertions, 56 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index c0db0e9d2cea..dff3893f32fd 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -63,59 +63,6 @@ static int alt = EM28XX_PINOUT;
63module_param(alt, int, 0644); 63module_param(alt, int, 0644);
64MODULE_PARM_DESC(alt, "alternate setting to use for video endpoint"); 64MODULE_PARM_DESC(alt, "alternate setting to use for video endpoint");
65 65
66/* ------------------------------------------------------------------ */
67/* debug help functions */
68
69static const char *v4l1_ioctls[] = {
70 "0", "CGAP", "GCHAN", "SCHAN", "GTUNER", "STUNER", "GPICT", "SPICT",
71 "CCAPTURE", "GWIN", "SWIN", "GFBUF", "SFBUF", "KEY", "GFREQ",
72 "SFREQ", "GAUDIO", "SAUDIO", "SYNC", "MCAPTURE", "GMBUF", "GUNIT",
73 "GCAPTURE", "SCAPTURE", "SPLAYMODE", "SWRITEMODE", "GPLAYINFO",
74 "SMICROCODE", "GVBIFMT", "SVBIFMT" };
75#define V4L1_IOCTLS ARRAY_SIZE(v4l1_ioctls)
76
77static const char *v4l2_ioctls[] = {
78 "QUERYCAP", "1", "ENUM_PIXFMT", "ENUM_FBUFFMT", "G_FMT", "S_FMT",
79 "G_COMP", "S_COMP", "REQBUFS", "QUERYBUF", "G_FBUF", "S_FBUF",
80 "G_WIN", "S_WIN", "PREVIEW", "QBUF", "16", "DQBUF", "STREAMON",
81 "STREAMOFF", "G_PERF", "G_PARM", "S_PARM", "G_STD", "S_STD",
82 "ENUMSTD", "ENUMINPUT", "G_CTRL", "S_CTRL", "G_TUNER", "S_TUNER",
83 "G_FREQ", "S_FREQ", "G_AUDIO", "S_AUDIO", "35", "QUERYCTRL",
84 "QUERYMENU", "G_INPUT", "S_INPUT", "ENUMCVT", "41", "42", "43",
85 "44", "45", "G_OUTPUT", "S_OUTPUT", "ENUMOUTPUT", "G_AUDOUT",
86 "S_AUDOUT", "ENUMFX", "G_EFFECT", "S_EFFECT", "G_MODULATOR",
87 "S_MODULATOR"
88};
89#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
90
91void em28xx_print_ioctl(char *name, unsigned int cmd)
92{
93 char *dir;
94
95 switch (_IOC_DIR(cmd)) {
96 case _IOC_NONE: dir = "--"; break;
97 case _IOC_READ: dir = "r-"; break;
98 case _IOC_WRITE: dir = "-w"; break;
99 case _IOC_READ | _IOC_WRITE: dir = "rw"; break;
100 default: dir = "??"; break;
101 }
102 switch (_IOC_TYPE(cmd)) {
103 case 'v':
104 printk(KERN_DEBUG "%s: ioctl 0x%08x (v4l1, %s, VIDIOC%s)\n",
105 name, cmd, dir, (_IOC_NR(cmd) < V4L1_IOCTLS) ?
106 v4l1_ioctls[_IOC_NR(cmd)] : "???");
107 break;
108 case 'V':
109 printk(KERN_DEBUG "%s: ioctl 0x%08x (v4l2, %s, VIDIOC_%s)\n",
110 name, cmd, dir, (_IOC_NR(cmd) < V4L2_IOCTLS) ?
111 v4l2_ioctls[_IOC_NR(cmd)] : "???");
112 break;
113 default:
114 printk(KERN_DEBUG "%s: ioctl 0x%08x (???, %s, #%d)\n",
115 name, cmd, dir, _IOC_NR(cmd));
116 }
117}
118
119 66
120/* 67/*
121 * em28xx_request_buffers() 68 * em28xx_request_buffers()
diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c
index 5385338efbf4..0591a705b7a1 100644
--- a/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/drivers/media/video/em28xx/em28xx-i2c.c
@@ -28,6 +28,7 @@
28#include <linux/video_decoder.h> 28#include <linux/video_decoder.h>
29 29
30#include "em28xx.h" 30#include "em28xx.h"
31#include <media/v4l2-common.h>
31#include <media/tuner.h> 32#include <media/tuner.h>
32 33
33/* ----------------------------------------------------------- */ 34/* ----------------------------------------------------------- */
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 0b5557c479ae..fdc255918dde 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1269,7 +1269,7 @@ static int em28xx_video_do_ioctl(struct inode *inode, struct file *filp,
1269 return -ENODEV; 1269 return -ENODEV;
1270 1270
1271 if (video_debug > 1) 1271 if (video_debug > 1)
1272 em28xx_print_ioctl(dev->name,cmd); 1272 v4l_print_ioctl(dev->name,cmd);
1273 1273
1274 switch (cmd) { 1274 switch (cmd) {
1275 1275
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index ffa9acc9be37..f99ee8eb5577 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -295,8 +295,6 @@ void em28xx_set_ir(struct em28xx * dev,struct IR_i2c *ir);
295 295
296/* Provided by em28xx-core.c */ 296/* Provided by em28xx-core.c */
297 297
298void em28xx_print_ioctl(char *name, unsigned int cmd);
299
300u32 em28xx_request_buffers(struct em28xx *dev, u32 count); 298u32 em28xx_request_buffers(struct em28xx *dev, u32 count);
301void em28xx_queue_unusedframes(struct em28xx *dev); 299void em28xx_queue_unusedframes(struct em28xx *dev);
302void em28xx_release_buffers(struct em28xx *dev); 300void em28xx_release_buffers(struct em28xx *dev);