Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250178
b: refs/heads/master
c: 54f4e11
h: refs/heads/master
v: v3
  • Loading branch information
Florian Mickler authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 87fe4fd commit 198a183
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca73877587abfb8213c8eb21fec4f7d2bca36069
refs/heads/master: 54f4e11ae3051ff7a921494be5106788db19dcf7
17 changes: 13 additions & 4 deletions trunk/drivers/media/dvb/dvb-usb/a800.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,26 @@ static struct rc_map_table rc_map_a800_table[] = {

static int a800_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
u8 key[5];
int ret;
u8 *key = kmalloc(5, GFP_KERNEL);
if (!key)
return -ENOMEM;

if (usb_control_msg(d->udev,usb_rcvctrlpipe(d->udev,0),
0x04, USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, key, 5,
2000) != 5)
return -ENODEV;
2000) != 5) {
ret = -ENODEV;
goto out;
}

/* call the universal NEC remote processor, to find out the key's state and event */
dvb_usb_nec_rc_key_to_event(d,key,event,state);
if (key[0] != 0)
deb_rc("key: %x %x %x %x %x\n",key[0],key[1],key[2],key[3],key[4]);
return 0;
ret = 0;
out:
kfree(key);
return ret;
}

/* USB Driver stuff */
Expand Down

0 comments on commit 198a183

Please sign in to comment.