aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-01-13 08:20:40 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-05 17:38:48 -0500
commit62ec3f86ff86483ae27b9411179b8ded74558c19 (patch)
tree359fbf82a3f717e1e29110a07f4db8e6f89d62c0 /drivers/media
parent59cf17d84353e175d40ff10ee9fa221d304d0836 (diff)
[media] em28xx: remove i2cdprintk() messages
We don't report any key/scan codes or errors inside the key polling functions for internal IR RC devices, just in the key handling fucntions. Do the same for external devices. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/em28xx-input.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index f554a5291619..edcd6978f2e1 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -40,11 +40,6 @@ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
40 40
41#define MODULE_NAME "em28xx" 41#define MODULE_NAME "em28xx"
42 42
43#define i2cdprintk(fmt, arg...) \
44 if (ir_debug) { \
45 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
46 }
47
48#define dprintk(fmt, arg...) \ 43#define dprintk(fmt, arg...) \
49 if (ir_debug) { \ 44 if (ir_debug) { \
50 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \ 45 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
@@ -86,17 +81,13 @@ static int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
86 unsigned char b; 81 unsigned char b;
87 82
88 /* poll IR chip */ 83 /* poll IR chip */
89 if (1 != i2c_master_recv(ir->c, &b, 1)) { 84 if (1 != i2c_master_recv(ir->c, &b, 1))
90 i2cdprintk("read error\n");
91 return -EIO; 85 return -EIO;
92 }
93 86
94 /* it seems that 0xFE indicates that a button is still hold 87 /* it seems that 0xFE indicates that a button is still hold
95 down, while 0xff indicates that no button is hold 88 down, while 0xff indicates that no button is hold
96 down. 0xfe sequences are sometimes interrupted by 0xFF */ 89 down. 0xfe sequences are sometimes interrupted by 0xFF */
97 90
98 i2cdprintk("key %02x\n", b);
99
100 if (b == 0xff) 91 if (b == 0xff)
101 return 0; 92 return 0;
102 93
@@ -147,9 +138,6 @@ static int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
147 ((buf[1] & 0x40) ? 0x0200 : 0) | /* 0000 0010 */ 138 ((buf[1] & 0x40) ? 0x0200 : 0) | /* 0000 0010 */
148 ((buf[1] & 0x80) ? 0x0100 : 0); /* 0000 0001 */ 139 ((buf[1] & 0x80) ? 0x0100 : 0); /* 0000 0001 */
149 140
150 i2cdprintk("ir hauppauge (em2840): code=0x%02x (rcv=0x%02x%02x)\n",
151 code, buf[1], buf[0]);
152
153 /* return key */ 141 /* return key */
154 *ir_key = code; 142 *ir_key = code;
155 *ir_raw = code; 143 *ir_raw = code;
@@ -163,12 +151,9 @@ static int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key,
163 151
164 /* poll IR chip */ 152 /* poll IR chip */
165 153
166 if (3 != i2c_master_recv(ir->c, buf, 3)) { 154 if (3 != i2c_master_recv(ir->c, buf, 3))
167 i2cdprintk("read error\n");
168 return -EIO; 155 return -EIO;
169 }
170 156
171 i2cdprintk("key %02x\n", buf[2]&0x3f);
172 if (buf[0] != 0x00) 157 if (buf[0] != 0x00)
173 return 0; 158 return 0;
174 159
@@ -188,19 +173,15 @@ static int em28xx_get_key_winfast_usbii_deluxe(struct IR_i2c *ir, u32 *ir_key,
188 { .addr = ir->c->addr, .flags = I2C_M_RD, .buf = &keydetect, .len = 1} }; 173 { .addr = ir->c->addr, .flags = I2C_M_RD, .buf = &keydetect, .len = 1} };
189 174
190 subaddr = 0x10; 175 subaddr = 0x10;
191 if (2 != i2c_transfer(ir->c->adapter, msg, 2)) { 176 if (2 != i2c_transfer(ir->c->adapter, msg, 2))
192 i2cdprintk("read error\n");
193 return -EIO; 177 return -EIO;
194 }
195 if (keydetect == 0x00) 178 if (keydetect == 0x00)
196 return 0; 179 return 0;
197 180
198 subaddr = 0x00; 181 subaddr = 0x00;
199 msg[1].buf = &key; 182 msg[1].buf = &key;
200 if (2 != i2c_transfer(ir->c->adapter, msg, 2)) { 183 if (2 != i2c_transfer(ir->c->adapter, msg, 2))
201 i2cdprintk("read error\n"); 184 return -EIO;
202 return -EIO;
203 }
204 if (key == 0x00) 185 if (key == 0x00)
205 return 0; 186 return 0;
206 187