aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-empress.c22
-rw-r--r--drivers/media/video/saa7134/saa7134-video.c61
2 files changed, 45 insertions, 38 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c
index 3854cc29752d..8b3f95167781 100644
--- a/drivers/media/video/saa7134/saa7134-empress.c
+++ b/drivers/media/video/saa7134/saa7134-empress.c
@@ -400,16 +400,7 @@ static const struct file_operations ts_fops =
400 .llseek = no_llseek, 400 .llseek = no_llseek,
401}; 401};
402 402
403/* ----------------------------------------------------------- */ 403static const struct v4l2_ioctl_ops ts_ioctl_ops = {
404
405static struct video_device saa7134_empress_template =
406{
407 .name = "saa7134-empress",
408 .type = 0 /* FIXME */,
409 .type2 = 0 /* FIXME */,
410 .fops = &ts_fops,
411 .minor = -1,
412
413 .vidioc_querycap = empress_querycap, 404 .vidioc_querycap = empress_querycap,
414 .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap, 405 .vidioc_enum_fmt_vid_cap = empress_enum_fmt_vid_cap,
415 .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap, 406 .vidioc_s_fmt_vid_cap = empress_s_fmt_vid_cap,
@@ -430,6 +421,17 @@ static struct video_device saa7134_empress_template =
430 .vidioc_querymenu = empress_querymenu, 421 .vidioc_querymenu = empress_querymenu,
431 .vidioc_g_ctrl = saa7134_g_ctrl, 422 .vidioc_g_ctrl = saa7134_g_ctrl,
432 .vidioc_s_ctrl = saa7134_s_ctrl, 423 .vidioc_s_ctrl = saa7134_s_ctrl,
424};
425
426/* ----------------------------------------------------------- */
427
428static struct video_device saa7134_empress_template = {
429 .name = "saa7134-empress",
430 .type = 0 /* FIXME */,
431 .type2 = 0 /* FIXME */,
432 .fops = &ts_fops,
433 .minor = -1,
434 .ioctl_ops = &ts_ioctl_ops,
433 435
434 .tvnorms = SAA7134_NORMS, 436 .tvnorms = SAA7134_NORMS,
435 .current_norm = V4L2_STD_PAL, 437 .current_norm = V4L2_STD_PAL,
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c
index 1a5137550e7a..5e9cfc891be8 100644
--- a/drivers/media/video/saa7134/saa7134-video.c
+++ b/drivers/media/video/saa7134/saa7134-video.c
@@ -2353,26 +2353,7 @@ static const struct file_operations video_fops =
2353 .llseek = no_llseek, 2353 .llseek = no_llseek,
2354}; 2354};
2355 2355
2356static const struct file_operations radio_fops = 2356static const struct v4l2_ioctl_ops video_ioctl_ops = {
2357{
2358 .owner = THIS_MODULE,
2359 .open = video_open,
2360 .release = video_release,
2361 .ioctl = video_ioctl2,
2362 .compat_ioctl = v4l_compat_ioctl32,
2363 .llseek = no_llseek,
2364};
2365
2366/* ----------------------------------------------------------- */
2367/* exported stuff */
2368
2369struct video_device saa7134_video_template =
2370{
2371 .name = "saa7134-video",
2372 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER |
2373 VID_TYPE_CLIPPING|VID_TYPE_SCALES,
2374 .fops = &video_fops,
2375 .minor = -1,
2376 .vidioc_querycap = saa7134_querycap, 2357 .vidioc_querycap = saa7134_querycap,
2377 .vidioc_enum_fmt_vid_cap = saa7134_enum_fmt_vid_cap, 2358 .vidioc_enum_fmt_vid_cap = saa7134_enum_fmt_vid_cap,
2378 .vidioc_g_fmt_vid_cap = saa7134_g_fmt_vid_cap, 2359 .vidioc_g_fmt_vid_cap = saa7134_g_fmt_vid_cap,
@@ -2421,16 +2402,18 @@ struct video_device saa7134_video_template =
2421 .vidioc_g_register = vidioc_g_register, 2402 .vidioc_g_register = vidioc_g_register,
2422 .vidioc_s_register = vidioc_s_register, 2403 .vidioc_s_register = vidioc_s_register,
2423#endif 2404#endif
2424 .tvnorms = SAA7134_NORMS,
2425 .current_norm = V4L2_STD_PAL,
2426}; 2405};
2427 2406
2428struct video_device saa7134_radio_template = 2407static const struct file_operations radio_fops = {
2429{ 2408 .owner = THIS_MODULE,
2430 .name = "saa7134-radio", 2409 .open = video_open,
2431 .type = VID_TYPE_TUNER, 2410 .release = video_release,
2432 .fops = &radio_fops, 2411 .ioctl = video_ioctl2,
2433 .minor = -1, 2412 .compat_ioctl = v4l_compat_ioctl32,
2413 .llseek = no_llseek,
2414};
2415
2416static const struct v4l2_ioctl_ops radio_ioctl_ops = {
2434 .vidioc_querycap = radio_querycap, 2417 .vidioc_querycap = radio_querycap,
2435 .vidioc_g_tuner = radio_g_tuner, 2418 .vidioc_g_tuner = radio_g_tuner,
2436 .vidioc_enum_input = radio_enum_input, 2419 .vidioc_enum_input = radio_enum_input,
@@ -2447,6 +2430,28 @@ struct video_device saa7134_radio_template =
2447 .vidioc_s_frequency = saa7134_s_frequency, 2430 .vidioc_s_frequency = saa7134_s_frequency,
2448}; 2431};
2449 2432
2433/* ----------------------------------------------------------- */
2434/* exported stuff */
2435
2436struct video_device saa7134_video_template = {
2437 .name = "saa7134-video",
2438 .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER |
2439 VID_TYPE_CLIPPING|VID_TYPE_SCALES,
2440 .fops = &video_fops,
2441 .ioctl_ops = &video_ioctl_ops,
2442 .minor = -1,
2443 .tvnorms = SAA7134_NORMS,
2444 .current_norm = V4L2_STD_PAL,
2445};
2446
2447struct video_device saa7134_radio_template = {
2448 .name = "saa7134-radio",
2449 .type = VID_TYPE_TUNER,
2450 .fops = &radio_fops,
2451 .ioctl_ops = &radio_ioctl_ops,
2452 .minor = -1,
2453};
2454
2450int saa7134_video_init1(struct saa7134_dev *dev) 2455int saa7134_video_init1(struct saa7134_dev *dev)
2451{ 2456{
2452 /* sanitycheck insmod options */ 2457 /* sanitycheck insmod options */