aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-streams.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.c')
-rw-r--r--drivers/media/video/cx18/cx18-streams.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 778aa0c0f9b5..eff4a14d0152 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -130,7 +130,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
130 struct cx18_stream *s = &cx->streams[type]; 130 struct cx18_stream *s = &cx->streams[type];
131 u32 cap = cx->v4l2_cap; 131 u32 cap = cx->v4l2_cap;
132 int num_offset = cx18_stream_info[type].num_offset; 132 int num_offset = cx18_stream_info[type].num_offset;
133 int num = cx->num + cx18_first_minor + num_offset; 133 int num = cx->instance + cx18_first_minor + num_offset;
134 134
135 /* These four fields are always initialized. If video_dev == NULL, then 135 /* These four fields are always initialized. If video_dev == NULL, then
136 this stream is not in use. In that case no other fields but these 136 this stream is not in use. In that case no other fields but these
@@ -170,11 +170,11 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
170 return -ENOMEM; 170 return -ENOMEM;
171 } 171 }
172 172
173 snprintf(s->video_dev->name, sizeof(s->video_dev->name), "cx18-%d", 173 snprintf(s->video_dev->name, sizeof(s->video_dev->name), "%s %s",
174 cx->num); 174 cx->v4l2_dev.name, s->name);
175 175
176 s->video_dev->num = num; 176 s->video_dev->num = num;
177 s->video_dev->parent = &cx->pci_dev->dev; 177 s->video_dev->v4l2_dev = &cx->v4l2_dev;
178 s->video_dev->fops = &cx18_v4l2_enc_fops; 178 s->video_dev->fops = &cx18_v4l2_enc_fops;
179 s->video_dev->release = video_device_release; 179 s->video_dev->release = video_device_release;
180 s->video_dev->tvnorms = V4L2_STD_ALL; 180 s->video_dev->tvnorms = V4L2_STD_ALL;
@@ -239,6 +239,7 @@ static int cx18_reg_dev(struct cx18 *cx, int type)
239 num = s_mpg->video_dev->num 239 num = s_mpg->video_dev->num
240 + cx18_stream_info[type].num_offset; 240 + cx18_stream_info[type].num_offset;
241 } 241 }
242 video_set_drvdata(s->video_dev, s);
242 243
243 /* Register device. First try the desired minor, then any free one. */ 244 /* Register device. First try the desired minor, then any free one. */
244 ret = video_register_device(s->video_dev, vfl_type, num); 245 ret = video_register_device(s->video_dev, vfl_type, num);