aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-video.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-video.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index 043fc4e5c586..ad2235dab5b1 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -33,6 +33,7 @@
33 33
34#include "cx23885.h" 34#include "cx23885.h"
35#include <media/v4l2-common.h> 35#include <media/v4l2-common.h>
36#include <media/v4l2-ioctl.h>
36 37
37#ifdef CONFIG_VIDEO_V4L1_COMPAT 38#ifdef CONFIG_VIDEO_V4L1_COMPAT
38/* Include V4L1 specific functions. Should be removed soon */ 39/* Include V4L1 specific functions. Should be removed soon */
@@ -326,7 +327,7 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
326 return NULL; 327 return NULL;
327 *vfd = *template; 328 *vfd = *template;
328 vfd->minor = -1; 329 vfd->minor = -1;
329 vfd->dev = &pci->dev; 330 vfd->parent = &pci->dev;
330 vfd->release = video_device_release; 331 vfd->release = video_device_release;
331 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", 332 snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
332 dev->name, type, cx23885_boards[dev->board].name); 333 dev->name, type, cx23885_boards[dev->board].name);
@@ -1433,12 +1434,7 @@ static const struct file_operations video_fops = {
1433 .llseek = no_llseek, 1434 .llseek = no_llseek,
1434}; 1435};
1435 1436
1436static struct video_device cx23885_vbi_template; 1437static const struct v4l2_ioctl_ops video_ioctl_ops = {
1437static struct video_device cx23885_video_template = {
1438 .name = "cx23885-video",
1439 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_SCALES,
1440 .fops = &video_fops,
1441 .minor = -1,
1442 .vidioc_querycap = vidioc_querycap, 1438 .vidioc_querycap = vidioc_querycap,
1443 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, 1439 .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
1444 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap, 1440 .vidioc_g_fmt_vid_cap = vidioc_g_fmt_vid_cap,
@@ -1471,6 +1467,14 @@ static struct video_device cx23885_video_template = {
1471 .vidioc_g_register = vidioc_g_register, 1467 .vidioc_g_register = vidioc_g_register,
1472 .vidioc_s_register = vidioc_s_register, 1468 .vidioc_s_register = vidioc_s_register,
1473#endif 1469#endif
1470};
1471
1472static struct video_device cx23885_vbi_template;
1473static struct video_device cx23885_video_template = {
1474 .name = "cx23885-video",
1475 .fops = &video_fops,
1476 .minor = -1,
1477 .ioctl_ops = &video_ioctl_ops,
1474 .tvnorms = CX23885_NORMS, 1478 .tvnorms = CX23885_NORMS,
1475 .current_norm = V4L2_STD_NTSC_M, 1479 .current_norm = V4L2_STD_NTSC_M,
1476}; 1480};
@@ -1512,7 +1516,6 @@ int cx23885_video_register(struct cx23885_dev *dev)
1512 memcpy(&cx23885_vbi_template, &cx23885_video_template, 1516 memcpy(&cx23885_vbi_template, &cx23885_video_template,
1513 sizeof(cx23885_vbi_template)); 1517 sizeof(cx23885_vbi_template));
1514 strcpy(cx23885_vbi_template.name, "cx23885-vbi"); 1518 strcpy(cx23885_vbi_template.name, "cx23885-vbi");
1515 cx23885_vbi_template.type = VID_TYPE_TELETEXT|VID_TYPE_TUNER;
1516 1519
1517 dev->tvnorm = cx23885_video_template.current_norm; 1520 dev->tvnorm = cx23885_video_template.current_norm;
1518 1521