Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357561
b: refs/heads/master
c: b940a22
h: refs/heads/master
i:
  357559: b5a22fd
v: v3
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Feb 13, 2013
1 parent 53be010 commit 5405173
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 4db45af5ecdd5a989b5da2e05e37746dffaec0be
refs/heads/master: b940a2219c9d59171339cc4510462154934fcb49
8 changes: 4 additions & 4 deletions trunk/drivers/media/rc/mceusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,16 +828,16 @@ static int mceusb_tx_ir(struct rc_dev *dev, unsigned *txbuf, unsigned count)
(txbuf[i] -= MCE_MAX_PULSE_LENGTH));
}

/* Fix packet length in last header */
length = cmdcount % MCE_CODE_LENGTH;
cmdbuf[cmdcount - length] -= MCE_CODE_LENGTH - length;

/* Check if we have room for the empty packet at the end */
if (cmdcount >= MCE_CMDBUF_SIZE) {
ret = -EINVAL;
goto out;
}

/* Fix packet length in last header */
length = cmdcount % MCE_CODE_LENGTH;
cmdbuf[cmdcount - length] -= MCE_CODE_LENGTH - length;

/* All mce commands end with an empty packet (0x80) */
cmdbuf[cmdcount++] = MCE_IRDATA_TRAILER;

Expand Down

0 comments on commit 5405173

Please sign in to comment.