Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367065
b: refs/heads/master
c: 76dea4c
h: refs/heads/master
i:
  367063: b0fd771
v: v3
  • Loading branch information
William Steidtmann authored and Mauro Carvalho Chehab committed Apr 16, 2013
1 parent a7d0807 commit 8092cc3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: bebe3c69de77fed87c1e36cc18e9c80985391918
refs/heads/master: 76dea4cf52784474ca6adc4a2addf55e128b3634
11 changes: 9 additions & 2 deletions trunk/drivers/media/rc/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static char SET_RX_SENSOR[] = {MCE_CMD_PORT_IR,
MCE_RSP_EQIRRXPORTEN, 0x00};
*/

static int mceusb_cmdsize(u8 cmd, u8 subcmd)
static int mceusb_cmd_datasize(u8 cmd, u8 subcmd)
{
int datasize = 0;

Expand All @@ -493,13 +493,19 @@ static int mceusb_cmdsize(u8 cmd, u8 subcmd)
break;
case MCE_CMD_PORT_SYS:
switch (subcmd) {
case MCE_RSP_GETPORTSTATUS:
datasize = 5;
break;
case MCE_RSP_EQWAKEVERSION:
datasize = 4;
break;
case MCE_CMD_G_REVISION:
datasize = 2;
break;
case MCE_RSP_EQWAKESUPPORT:
case MCE_RSP_GETWAKESOURCE:
case MCE_RSP_EQDEVDETAILS:
case MCE_RSP_EQEMVER:
datasize = 1;
break;
}
Expand All @@ -509,6 +515,7 @@ static int mceusb_cmdsize(u8 cmd, u8 subcmd)
case MCE_RSP_EQIRCFS:
case MCE_RSP_EQIRTIMEOUT:
case MCE_RSP_EQIRRXCFCNT:
case MCE_RSP_EQIRNUMPORTS:
datasize = 2;
break;
case MCE_CMD_SIG_END:
Expand Down Expand Up @@ -968,7 +975,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
for (; i < buf_len; i++) {
switch (ir->parser_state) {
case SUBCMD:
ir->rem = mceusb_cmdsize(ir->cmd, ir->buf_in[i]);
ir->rem = mceusb_cmd_datasize(ir->cmd, ir->buf_in[i]);
mceusb_dev_printdata(ir, ir->buf_in, i - 1,
ir->rem + 2, false);
mceusb_handle_command(ir, i);
Expand Down

0 comments on commit 8092cc3

Please sign in to comment.