Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271749
b: refs/heads/master
c: 2122eaf
h: refs/heads/master
i:
  271747: 569f3f8
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Sep 6, 2011
1 parent 624519e commit c405aa6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 7b4668efc4a8f75d12337cf8013307a7ec437878
refs/heads/master: 2122eaf64acd9ca42645b4bf8f222c7d452313f1
9 changes: 6 additions & 3 deletions trunk/drivers/media/dvb/ddbridge/ddbridge-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,14 @@ static u32 ddb_input_avail(struct ddb_input *input)
return 0;
}

static size_t ddb_input_read(struct ddb_input *input, u8 *buf, size_t count)
static ssize_t ddb_input_read(struct ddb_input *input, u8 *buf, size_t count)
{
struct ddb *dev = input->port->dev;
u32 left = count;
u32 idx, off, free, stat = input->stat;
u32 idx, free, stat = input->stat;
int ret;

idx = (stat >> 11) & 0x1f;
off = (stat & 0x7ff) << 7;

while (left) {
if (input->cbuf == idx)
Expand All @@ -525,6 +524,8 @@ static size_t ddb_input_read(struct ddb_input *input, u8 *buf, size_t count)
free = left;
ret = copy_to_user(buf, input->vbuf[input->cbuf] +
input->coff, free);
if (ret)
return -EFAULT;
input->coff += free;
if (input->coff == input->dma_buf_size) {
input->coff = 0;
Expand Down Expand Up @@ -939,6 +940,8 @@ static ssize_t ts_read(struct file *file, char *buf,
break;
}
read = ddb_input_read(input, buf, left);
if (read < 0)
return read;
left -= read;
buf += read;
}
Expand Down

0 comments on commit c405aa6

Please sign in to comment.