提交 108bdd7a 编写于 作者: J Joe Perches 提交者: Mauro Carvalho Chehab

V4L/DVB: pvrusb2-v4l2: Rename dev_info to pdi

There is a macro called dev_info that prints struct device specific
information.  Having variables with the same name can be confusing and
prevents conversion of the macro to a function.

Rename the existing dev_info variables to something else in preparation
to converting the dev_info macro to a function.
Signed-off-by: NJoe Perches <joe@perches.com>
Acked-by: NMike Isely <isely@pobox.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 09bd00e7
...@@ -49,7 +49,7 @@ struct pvr2_v4l2_dev { ...@@ -49,7 +49,7 @@ struct pvr2_v4l2_dev {
struct pvr2_v4l2_fh { struct pvr2_v4l2_fh {
struct pvr2_channel channel; struct pvr2_channel channel;
struct pvr2_v4l2_dev *dev_info; struct pvr2_v4l2_dev *pdi;
enum v4l2_priority prio; enum v4l2_priority prio;
struct pvr2_ioread *rhp; struct pvr2_ioread *rhp;
struct file *file; struct file *file;
...@@ -162,7 +162,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -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_fh *fh = file->private_data;
struct pvr2_v4l2 *vp = fh->vhead; 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; struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
long ret = -EINVAL; long ret = -EINVAL;
...@@ -564,14 +564,14 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -564,14 +564,14 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
case VIDIOC_STREAMON: case VIDIOC_STREAMON:
{ {
if (!fh->dev_info->stream) { if (!fh->pdi->stream) {
/* No stream defined for this node. This means /* No stream defined for this node. This means
that we're not currently allowed to stream from that we're not currently allowed to stream from
this node. */ this node. */
ret = -EPERM; ret = -EPERM;
break; 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; if (ret < 0) return ret;
ret = pvr2_hdw_set_streaming(hdw,!0); ret = pvr2_hdw_set_streaming(hdw,!0);
break; break;
...@@ -579,7 +579,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg) ...@@ -579,7 +579,7 @@ static long pvr2_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
case VIDIOC_STREAMOFF: case VIDIOC_STREAMOFF:
{ {
if (!fh->dev_info->stream) { if (!fh->pdi->stream) {
/* No stream defined for this node. This means /* No stream defined for this node. This means
that we're not currently allowed to stream from that we're not currently allowed to stream from
this node. */ this node. */
...@@ -1032,7 +1032,7 @@ static int pvr2_v4l2_open(struct file *file) ...@@ -1032,7 +1032,7 @@ static int pvr2_v4l2_open(struct file *file)
} }
init_waitqueue_head(&fhp->wait_data); 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_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
pvr2_channel_init(&fhp->channel,vp->channel.mc_head); pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
...@@ -1113,7 +1113,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) ...@@ -1113,7 +1113,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
struct pvr2_hdw *hdw; struct pvr2_hdw *hdw;
if (fh->rhp) return 0; 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 /* No stream defined for this node. This means that we're
not currently allowed to stream from this node. */ not currently allowed to stream from this node. */
return -EPERM; return -EPERM;
...@@ -1122,21 +1122,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh) ...@@ -1122,21 +1122,21 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
/* First read() attempt. Try to claim the stream and start /* First read() attempt. Try to claim the stream and start
it... */ it... */
if ((ret = pvr2_channel_claim_stream(&fh->channel, if ((ret = pvr2_channel_claim_stream(&fh->channel,
fh->dev_info->stream)) != 0) { fh->pdi->stream)) != 0) {
/* Someone else must already have it */ /* Someone else must already have it */
return ret; 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) { if (!fh->rhp) {
pvr2_channel_claim_stream(&fh->channel,NULL); pvr2_channel_claim_stream(&fh->channel,NULL);
return -ENOMEM; return -ENOMEM;
} }
hdw = fh->channel.mc_head->hdw; 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_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; if ((ret = pvr2_hdw_set_streaming(hdw,!0)) < 0) return ret;
return pvr2_ioread_set_enabled(fh->rhp,!0); return pvr2_ioread_set_enabled(fh->rhp,!0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册