Skip to content

Commit

Permalink
[media] iguanair: reset the IR state after rx overflow or receiver en…
Browse files Browse the repository at this point in the history
…able

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sean Young authored and Mauro Carvalho Chehab committed Aug 13, 2012
1 parent 884bfd0 commit 116e4f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/rc/iguanair.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ static void process_ir_data(struct iguanair *ir, unsigned len)
break;
case CMD_RX_OVERFLOW:
dev_warn(ir->dev, "receive overflow\n");
ir_raw_event_reset(ir->rc);
break;
default:
dev_warn(ir->dev, "control code %02x received\n",
Expand Down Expand Up @@ -255,6 +256,9 @@ static int iguanair_receiver(struct iguanair *ir, bool enable)
struct packet packet = { 0, DIR_OUT, enable ?
CMD_RECEIVER_ON : CMD_RECEIVER_OFF };

if (enable)
ir_raw_event_reset(ir->rc);

return iguanair_send(ir, &packet, sizeof(packet));
}

Expand Down

0 comments on commit 116e4f5

Please sign in to comment.