diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index bf1e0fe9f4d2..fe4159d478b3 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -49,7 +49,7 @@ struct pvr2_v4l2_dev { | |||
49 | 49 | ||
50 | struct pvr2_v4l2_fh { | 50 | struct pvr2_v4l2_fh { |
51 | struct pvr2_channel channel; | 51 | struct pvr2_channel channel; |
52 | struct pvr2_v4l2_dev *dev_info; | 52 | struct pvr2_v4l2_dev *pdi; |
53 | enum v4l2_priority prio; | 53 | enum v4l2_priority prio; |
54 | struct pvr2_ioread *rhp; | 54 | struct pvr2_ioread *rhp; |
55 | struct file *file; | 55 | struct file *file; |
@@ -162,7 +162,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
162 | { | 162 | { |
163 | struct pvr2_v4l2_fh *fh = file->private_data; | 163 | struct pvr2_v4l2_fh *fh = file->private_data; |
164 | struct pvr2_v4l2 *vp = fh->vhead; | 164 | struct pvr2_v4l2 *vp = fh->vhead; |
165 | struct pvr2_v4l2_dev *dev_info = fh->dev_info; | 165 | struct pvr2_v4l2_dev *pdi = fh->pdi; |
166 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; | 166 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; |
167 | long ret = -EINVAL; | 167 | long ret = -EINVAL; |
168 | 168 | ||
@@ -564,14 +564,14 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
564 | 564 | ||
565 | case VIDIOC_STREAMON: | 565 | case VIDIOC_STREAMON: |
566 | { | 566 | { |
567 | if (!fh->dev_info->stream) { | 567 | if (!fh->pdi->stream) { |
568 | /* No stream defined for this node. This means | 568 | /* No stream defined for this node. This means |
569 | that we're not currently allowed to stream from | 569 | that we're not currently allowed to stream from |
570 | this node. */ | 570 | this node. */ |
571 | ret = -EPERM; | 571 | ret = -EPERM; |
572 | break; | 572 | break; |
573 | } | 573 | } |
574 | ret = pvr2_hdw_set_stream_type(hdw,dev_info->config); | 574 | ret = pvr2_hdw_set_stream_type(hdw,pdi->config); |
575 | if (ret < 0) return ret; | 575 | if (ret < 0) return ret; |
576 | ret = pvr2_hdw_set_streaming(hdw,!0); | 576 | ret = pvr2_hdw_set_streaming(hdw,!0); |
577 | break; | 577 | break; |
@@ -579,7 +579,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) | |||
579 | 579 | ||
580 | case VIDIOC_STREAMOFF: | 580 | case VIDIOC_STREAMOFF: |
581 | { | 581 | { |
582 | if (!fh->dev_info->stream) { | 582 | if (!fh->pdi->stream) { |
583 | /* No stream defined for this node. This means | 583 | /* No stream defined for this node. This means |
584 | that we're not currently allowed to stream from | 584 | that we're not currently allowed to stream from |
585 | this node. */ | 585 | this node. */ |
@@ -1032,7 +1032,7 @@ static int pvr2_v4l2_open(struct file *file) | |||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | init_waitqueue_head(&fhp->wait_data); | 1034 | init_waitqueue_head(&fhp->wait_data); |
1035 | fhp->dev_info = dip; | 1035 | fhp->pdi = dip; |
1036 | 1036 | ||
1037 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); | 1037 | pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); |
1038 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); | 1038 | pvr2_channel_init(&fhp->channel,vp->channel.mc_head); |
@@ -1113,7 +1113,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) | |||
1113 | struct pvr2_hdw *hdw; | 1113 | struct pvr2_hdw *hdw; |
1114 | if (fh->rhp) return 0; | 1114 | if (fh->rhp) return 0; |
1115 | 1115 | ||
1116 | if (!fh->dev_info->stream) { | 1116 | if (!fh->pdi->stream) { |
1117 | /* No stream defined for this node. This means that we're | 1117 | /* No stream defined for this node. This means that we're |
1118 | not currently allowed to stream from this node. */ | 1118 | not currently allowed to stream from this node. */ |
1119 | return -EPERM; | 1119 | return -EPERM; |
@@ -1122,21 +1122,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) | |||
1122 | /* First read() attempt. Try to claim the stream and start | 1122 | /* First read() attempt. Try to claim the stream and start |
1123 | it... */ | 1123 | it... */ |
1124 | if ((ret = pvr2_channel_claim_stream(&fh->channel, | 1124 | if ((ret = pvr2_channel_claim_stream(&fh->channel, |
1125 | fh->dev_info->stream)) != 0) { | 1125 | fh->pdi->stream)) != 0) { |
1126 | /* Someone else must already have it */ | 1126 | /* Someone else must already have it */ |
1127 | return ret; | 1127 | return ret; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); | 1130 | fh->rhp = pvr2_channel_create_mpeg_stream(fh->pdi->stream); |
1131 | if (!fh->rhp) { | 1131 | if (!fh->rhp) { |
1132 | pvr2_channel_claim_stream(&fh->channel,NULL); | 1132 | pvr2_channel_claim_stream(&fh->channel,NULL); |
1133 | return -ENOMEM; | 1133 | return -ENOMEM; |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | hdw = fh->channel.mc_head->hdw; | 1136 | hdw = fh->channel.mc_head->hdw; |
1137 | sp = fh->dev_info->stream->stream; | 1137 | sp = fh->pdi->stream->stream; |
1138 | pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh); | 1138 | pvr2_stream_set_callback(sp,(pvr2_stream_callback)pvr2_v4l2_notify,fh); |
1139 | pvr2_hdw_set_stream_type(hdw,fh->dev_info->config); | 1139 | pvr2_hdw_set_stream_type(hdw,fh->pdi->config); |
1140 | if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret; | 1140 | if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret; |
1141 | return pvr2_ioread_set_enabled(fh->rhp,!0); | 1141 | return pvr2_ioread_set_enabled(fh->rhp,!0); |
1142 | } | 1142 | } |