diff options
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index dfa399da587d..85bf31ab8789 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -4182,8 +4182,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id) | |||
4182 | 4182 | ||
4183 | static struct video_device *vdev_init(struct bttv *btv, | 4183 | static struct video_device *vdev_init(struct bttv *btv, |
4184 | const struct video_device *template, | 4184 | const struct video_device *template, |
4185 | const char *type_name, | 4185 | const char *type_name) |
4186 | const int type) | ||
4187 | { | 4186 | { |
4188 | struct video_device *vfd; | 4187 | struct video_device *vfd; |
4189 | 4188 | ||
@@ -4194,7 +4193,6 @@ static struct video_device *vdev_init(struct bttv *btv, | |||
4194 | vfd->minor = -1; | 4193 | vfd->minor = -1; |
4195 | vfd->parent = &btv->c.pci->dev; | 4194 | vfd->parent = &btv->c.pci->dev; |
4196 | vfd->release = video_device_release; | 4195 | vfd->release = video_device_release; |
4197 | vfd->type = type; | ||
4198 | vfd->debug = bttv_debug; | 4196 | vfd->debug = bttv_debug; |
4199 | snprintf(vfd->name, sizeof(vfd->name), "BT%d%s %s (%s)", | 4197 | snprintf(vfd->name, sizeof(vfd->name), "BT%d%s %s (%s)", |
4200 | btv->id, (btv->id==848 && btv->revision==0x12) ? "A" : "", | 4198 | btv->id, (btv->id==848 && btv->revision==0x12) ? "A" : "", |
@@ -4230,20 +4228,11 @@ static void bttv_unregister_video(struct bttv *btv) | |||
4230 | /* register video4linux devices */ | 4228 | /* register video4linux devices */ |
4231 | static int __devinit bttv_register_video(struct bttv *btv) | 4229 | static int __devinit bttv_register_video(struct bttv *btv) |
4232 | { | 4230 | { |
4233 | int video_type = VID_TYPE_CAPTURE | | 4231 | if (no_overlay > 0) |
4234 | VID_TYPE_TUNER | | ||
4235 | VID_TYPE_CLIPPING| | ||
4236 | VID_TYPE_SCALES; | ||
4237 | |||
4238 | if (no_overlay <= 0) { | ||
4239 | bttv_video_template.type |= VID_TYPE_OVERLAY; | ||
4240 | } else { | ||
4241 | printk("bttv: Overlay support disabled.\n"); | 4232 | printk("bttv: Overlay support disabled.\n"); |
4242 | } | ||
4243 | 4233 | ||
4244 | /* video */ | 4234 | /* video */ |
4245 | btv->video_dev = vdev_init(btv, &bttv_video_template, | 4235 | btv->video_dev = vdev_init(btv, &bttv_video_template, "video"); |
4246 | "video", video_type); | ||
4247 | 4236 | ||
4248 | if (NULL == btv->video_dev) | 4237 | if (NULL == btv->video_dev) |
4249 | goto err; | 4238 | goto err; |
@@ -4259,8 +4248,7 @@ static int __devinit bttv_register_video(struct bttv *btv) | |||
4259 | } | 4248 | } |
4260 | 4249 | ||
4261 | /* vbi */ | 4250 | /* vbi */ |
4262 | btv->vbi_dev = vdev_init(btv, &bttv_video_template, | 4251 | btv->vbi_dev = vdev_init(btv, &bttv_video_template, "vbi"); |
4263 | "vbi", VID_TYPE_TUNER | VID_TYPE_TELETEXT); | ||
4264 | 4252 | ||
4265 | if (NULL == btv->vbi_dev) | 4253 | if (NULL == btv->vbi_dev) |
4266 | goto err; | 4254 | goto err; |
@@ -4272,8 +4260,7 @@ static int __devinit bttv_register_video(struct bttv *btv) | |||
4272 | if (!btv->has_radio) | 4260 | if (!btv->has_radio) |
4273 | return 0; | 4261 | return 0; |
4274 | /* radio */ | 4262 | /* radio */ |
4275 | btv->radio_dev = vdev_init(btv, &radio_template, | 4263 | btv->radio_dev = vdev_init(btv, &radio_template, "radio"); |
4276 | "radio", VID_TYPE_TUNER); | ||
4277 | if (NULL == btv->radio_dev) | 4264 | if (NULL == btv->radio_dev) |
4278 | goto err; | 4265 | goto err; |
4279 | if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,radio_nr)<0) | 4266 | if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,radio_nr)<0) |