aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tm6000
diff options
context:
space:
mode:
authorStefan Ringel <linuxtv@stefanringel.de>2011-11-28 13:46:20 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-28 18:31:09 -0500
commitedcfdd919a1c8afbf500be0dbfa9b68f40b4c219 (patch)
tree7d460f269a1f5cd322dfc349e48fc7e518e5e7c6 /drivers/media/video/tm6000
parentde2a20baff364b8dd19371acc1dc0b138e0b08b9 (diff)
[media] tm6000: bugfix data check
beholder use a map with 3 bytes, but many rc maps have 2 bytes, so I add a workaround for beholder rc. Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tm6000')
-rw-r--r--drivers/media/video/tm6000/tm6000-input.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c
index 405d12729d05..ae7772e7f266 100644
--- a/drivers/media/video/tm6000/tm6000-input.c
+++ b/drivers/media/video/tm6000/tm6000-input.c
@@ -178,9 +178,21 @@ static int default_polling_getkey(struct tm6000_IR *ir,
178 poll_result->rc_data = ir->urb_data[0]; 178 poll_result->rc_data = ir->urb_data[0];
179 break; 179 break;
180 case RC_TYPE_NEC: 180 case RC_TYPE_NEC:
181 if (ir->urb_data[1] == ((ir->key_addr >> 8) & 0xff)) { 181 switch (dev->model) {
182 case 10:
183 case 11:
184 case 14:
185 case 15:
186 if (ir->urb_data[1] ==
187 ((ir->key_addr >> 8) & 0xff)) {
188 poll_result->rc_data =
189 ir->urb_data[0]
190 | ir->urb_data[1] << 8;
191 }
192 break;
193 default:
182 poll_result->rc_data = ir->urb_data[0] 194 poll_result->rc_data = ir->urb_data[0]
183 | ir->urb_data[1] << 8; 195 | ir->urb_data[1] << 8;
184 } 196 }
185 break; 197 break;
186 default: 198 default:
@@ -238,8 +250,6 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir)
238 return; 250 return;
239 } 251 }
240 252
241 dprintk("ir->get_key result data=%04x\n", poll_result.rc_data);
242
243 if (ir->pwled) { 253 if (ir->pwled) {
244 if (ir->pwledcnt >= PWLED_OFF) { 254 if (ir->pwledcnt >= PWLED_OFF) {
245 ir->pwled = 0; 255 ir->pwled = 0;
@@ -250,6 +260,7 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir)
250 } 260 }
251 261
252 if (ir->key) { 262 if (ir->key) {
263 dprintk("ir->get_key result data=%04x\n", poll_result.rc_data);
253 rc_keydown(ir->rc, poll_result.rc_data, 0); 264 rc_keydown(ir->rc, poll_result.rc_data, 0);
254 ir->key = 0; 265 ir->key = 0;
255 ir->pwled = 1; 266 ir->pwled = 1;
@@ -333,7 +344,7 @@ int tm6000_ir_int_start(struct tm6000_core *dev)
333 ir->int_urb->transfer_buffer, size, 344 ir->int_urb->transfer_buffer, size,
334 tm6000_ir_urb_received, dev, 345 tm6000_ir_urb_received, dev,
335 dev->int_in.endp->desc.bInterval); 346 dev->int_in.endp->desc.bInterval);
336 err = usb_submit_urb(ir->int_urb, GFP_KERNEL); 347 err = usb_submit_urb(ir->int_urb, GFP_ATOMIC);
337 if (err) { 348 if (err) {
338 kfree(ir->int_urb->transfer_buffer); 349 kfree(ir->int_urb->transfer_buffer);
339 usb_free_urb(ir->int_urb); 350 usb_free_urb(ir->int_urb);