Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193001
b: refs/heads/master
c: 108bdd7
h: refs/heads/master
i:
  192999: a2be6d2
v: v3
  • Loading branch information
Joe Perches authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 0e15406 commit 67f5222
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: 09bd00e7e12bbc9ca0ba20e0511995cddd3c93b9
refs/heads/master: 108bdd7ad778ac4616857820cbbc17924073a7d5
22 changes: 11 additions & 11 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct pvr2_v4l2_dev {

struct pvr2_v4l2_fh {
struct pvr2_channel channel;
struct pvr2_v4l2_dev *dev_info;
struct pvr2_v4l2_dev *pdi;
enum v4l2_priority prio;
struct pvr2_ioread *rhp;
struct file *file;
Expand Down Expand Up @@ -162,7 +162,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
struct pvr2_v4l2_fh *fh = file->private_data;
struct pvr2_v4l2 *vp = fh->vhead;
struct pvr2_v4l2_dev *dev_info = fh->dev_info;
struct pvr2_v4l2_dev *pdi = fh->pdi;
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
long ret = -EINVAL;

Expand Down Expand Up @@ -564,22 +564,22 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)

case VIDIOC_STREAMON:
{
if (!fh->dev_info->stream) {
if (!fh->pdi->stream) {
/* No stream defined for this node. This means
that we're not currently allowed to stream from
this node. */
ret = -EPERM;
break;
}
ret = pvr2_hdw_set_stream_type(hdw,dev_info->config);
ret = pvr2_hdw_set_stream_type(hdw,pdi->config);
if (ret < 0) return ret;
ret = pvr2_hdw_set_streaming(hdw,!0);
break;
}

case VIDIOC_STREAMOFF:
{
if (!fh->dev_info->stream) {
if (!fh->pdi->stream) {
/* No stream defined for this node. This means
that we're not currently allowed to stream from
this node. */
Expand Down Expand Up @@ -1032,7 +1032,7 @@ static int pvr2_v4l2_open(struct file *file)
}

init_waitqueue_head(&fhp->wait_data);
fhp->dev_info = dip;
fhp->pdi = dip;

pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
Expand Down Expand Up @@ -1113,7 +1113,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
struct pvr2_hdw *hdw;
if (fh->rhp) return 0;

if (!fh->dev_info->stream) {
if (!fh->pdi->stream) {
/* No stream defined for this node. This means that we're
not currently allowed to stream from this node. */
return -EPERM;
Expand All @@ -1122,21 +1122,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
/* First read() attempt. Try to claim the stream and start
it... */
if ((ret = pvr2_channel_claim_stream(&fh->channel,
fh->dev_info->stream)) != 0) {
fh->pdi->stream)) != 0) {
/* Someone else must already have it */
return ret;
}

fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream);
fh->rhp = pvr2_channel_create_mpeg_stream(fh->pdi->stream);
if (!fh->rhp) {
pvr2_channel_claim_stream(&fh->channel,NULL);
return -ENOMEM;
}

hdw = fh->channel.mc_head->hdw;
sp = fh->dev_info->stream->stream;
sp = fh->pdi->stream->stream;
pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh);
pvr2_hdw_set_stream_type(hdw,fh->dev_info->config);
pvr2_hdw_set_stream_type(hdw,fh->pdi->config);
if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
return pvr2_ioread_set_enabled(fh->rhp,!0);
}
Expand Down

0 comments on commit 67f5222

Please sign in to comment.