aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zr364xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/zr364xx.c')
-rw-r--r--drivers/media/video/zr364xx.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c
index f2f8cdd71c46..221409fe1682 100644
--- a/drivers/media/video/zr364xx.c
+++ b/drivers/media/video/zr364xx.c
@@ -426,7 +426,6 @@ static ssize_t zr364xx_read(struct file *file, char __user *buf, size_t cnt,
426static int zr364xx_vidioc_querycap(struct file *file, void *priv, 426static int zr364xx_vidioc_querycap(struct file *file, void *priv,
427 struct v4l2_capability *cap) 427 struct v4l2_capability *cap)
428{ 428{
429 memset(cap, 0, sizeof(*cap));
430 strcpy(cap->driver, DRIVER_DESC); 429 strcpy(cap->driver, DRIVER_DESC);
431 cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE; 430 cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE;
432 return 0; 431 return 0;
@@ -437,8 +436,6 @@ static int zr364xx_vidioc_enum_input(struct file *file, void *priv,
437{ 436{
438 if (i->index != 0) 437 if (i->index != 0)
439 return -EINVAL; 438 return -EINVAL;
440 memset(i, 0, sizeof(*i));
441 i->index = 0;
442 strcpy(i->name, DRIVER_DESC " Camera"); 439 strcpy(i->name, DRIVER_DESC " Camera");
443 i->type = V4L2_INPUT_TYPE_CAMERA; 440 i->type = V4L2_INPUT_TYPE_CAMERA;
444 return 0; 441 return 0;
@@ -530,11 +527,6 @@ static int zr364xx_vidioc_enum_fmt_vid_cap(struct file *file,
530{ 527{
531 if (f->index > 0) 528 if (f->index > 0)
532 return -EINVAL; 529 return -EINVAL;
533 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
534 return -EINVAL;
535 memset(f, 0, sizeof(*f));
536 f->index = 0;
537 f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
538 f->flags = V4L2_FMT_FLAG_COMPRESSED; 530 f->flags = V4L2_FMT_FLAG_COMPRESSED;
539 strcpy(f->description, "JPEG"); 531 strcpy(f->description, "JPEG");
540 f->pixelformat = V4L2_PIX_FMT_JPEG; 532 f->pixelformat = V4L2_PIX_FMT_JPEG;
@@ -551,8 +543,6 @@ static int zr364xx_vidioc_try_fmt_vid_cap(struct file *file, void *priv,
551 return -ENODEV; 543 return -ENODEV;
552 cam = video_get_drvdata(vdev); 544 cam = video_get_drvdata(vdev);
553 545
554 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
555 return -EINVAL;
556 if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) 546 if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG)
557 return -EINVAL; 547 return -EINVAL;
558 if (f->fmt.pix.field != V4L2_FIELD_ANY && 548 if (f->fmt.pix.field != V4L2_FIELD_ANY &&
@@ -578,10 +568,6 @@ static int zr364xx_vidioc_g_fmt_vid_cap(struct file *file, void *priv,
578 return -ENODEV; 568 return -ENODEV;
579 cam = video_get_drvdata(vdev); 569 cam = video_get_drvdata(vdev);
580 570
581 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
582 return -EINVAL;
583 memset(&f->fmt.pix, 0, sizeof(struct v4l2_pix_format));
584 f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
585 f->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG; 571 f->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
586 f->fmt.pix.field = V4L2_FIELD_NONE; 572 f->fmt.pix.field = V4L2_FIELD_NONE;
587 f->fmt.pix.width = cam->width; 573 f->fmt.pix.width = cam->width;
@@ -603,8 +589,6 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv,
603 return -ENODEV; 589 return -ENODEV;
604 cam = video_get_drvdata(vdev); 590 cam = video_get_drvdata(vdev);
605 591
606 if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
607 return -EINVAL;
608 if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) 592 if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG)
609 return -EINVAL; 593 return -EINVAL;
610 if (f->fmt.pix.field != V4L2_FIELD_ANY && 594 if (f->fmt.pix.field != V4L2_FIELD_ANY &&