Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242183
b: refs/heads/master
c: cc664ae
h: refs/heads/master
i:
  242181: 1014e01
  242179: 4f95775
  242175: 039da57
v: v3
  • Loading branch information
Jarod Wilson authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 97cf1ce commit c0dbf17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 55734785cdaff596be9a5238af54fc0f4ace2e63
refs/heads/master: cc664ae026f1b0f3254564a7d45cc29e735c7fed
8 changes: 7 additions & 1 deletion trunk/drivers/staging/lirc/lirc_zilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
struct IR *ir = filep->private_data;
struct IR_rx *rx;
struct lirc_buffer *rbuf = ir->l.rbuf;
int ret = 0, written = 0;
int ret = 0, written = 0, retries = 0;
unsigned int m;
DECLARE_WAITQUEUE(wait, current);

Expand Down Expand Up @@ -950,6 +950,12 @@ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
ret = copy_to_user((void *)outbuf+written, buf,
rbuf->chunk_size);
written += rbuf->chunk_size;
} else {
retries++;
}
if (retries >= 5) {
zilog_error("Buffer read failed!\n");
ret = -EIO;
}
}
}
Expand Down

0 comments on commit c0dbf17

Please sign in to comment.