diff options
Diffstat (limited to 'drivers/media/video/zr364xx.c')
-rw-r--r-- | drivers/media/video/zr364xx.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index 93023560f324..221409fe1682 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -96,6 +96,7 @@ static struct usb_device_id device_table[] = { | |||
96 | {USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 }, | 96 | {USB_DEVICE(0x06d6, 0x003b), .driver_info = METHOD0 }, |
97 | {USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 }, | 97 | {USB_DEVICE(0x0a17, 0x004e), .driver_info = METHOD2 }, |
98 | {USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 }, | 98 | {USB_DEVICE(0x041e, 0x405d), .driver_info = METHOD2 }, |
99 | {USB_DEVICE(0x08ca, 0x2102), .driver_info = METHOD2 }, | ||
99 | {} /* Terminating entry */ | 100 | {} /* Terminating entry */ |
100 | }; | 101 | }; |
101 | 102 | ||
@@ -425,7 +426,6 @@ static ssize_t zr364xx_read(struct file *file, char __user *buf, size_t cnt, | |||
425 | static int zr364xx_vidioc_querycap(struct file *file, void *priv, | 426 | static int zr364xx_vidioc_querycap(struct file *file, void *priv, |
426 | struct v4l2_capability *cap) | 427 | struct v4l2_capability *cap) |
427 | { | 428 | { |
428 | memset(cap, 0, sizeof(*cap)); | ||
429 | strcpy(cap->driver, DRIVER_DESC); | 429 | strcpy(cap->driver, DRIVER_DESC); |
430 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE; | 430 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE; |
431 | return 0; | 431 | return 0; |
@@ -436,8 +436,6 @@ static int zr364xx_vidioc_enum_input(struct file *file, void *priv, | |||
436 | { | 436 | { |
437 | if (i->index != 0) | 437 | if (i->index != 0) |
438 | return -EINVAL; | 438 | return -EINVAL; |
439 | memset(i, 0, sizeof(*i)); | ||
440 | i->index = 0; | ||
441 | strcpy(i->name, DRIVER_DESC " Camera"); | 439 | strcpy(i->name, DRIVER_DESC " Camera"); |
442 | i->type = V4L2_INPUT_TYPE_CAMERA; | 440 | i->type = V4L2_INPUT_TYPE_CAMERA; |
443 | return 0; | 441 | return 0; |
@@ -529,11 +527,6 @@ static int zr364xx_vidioc_enum_fmt_vid_cap(struct file *file, | |||
529 | { | 527 | { |
530 | if (f->index > 0) | 528 | if (f->index > 0) |
531 | return -EINVAL; | 529 | return -EINVAL; |
532 | if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
533 | return -EINVAL; | ||
534 | memset(f, 0, sizeof(*f)); | ||
535 | f->index = 0; | ||
536 | f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
537 | f->flags = V4L2_FMT_FLAG_COMPRESSED; | 530 | f->flags = V4L2_FMT_FLAG_COMPRESSED; |
538 | strcpy(f->description, "JPEG"); | 531 | strcpy(f->description, "JPEG"); |
539 | f->pixelformat = V4L2_PIX_FMT_JPEG; | 532 | f->pixelformat = V4L2_PIX_FMT_JPEG; |
@@ -550,8 +543,6 @@ static int zr364xx_vidioc_try_fmt_vid_cap(struct file *file, void *priv, | |||
550 | return -ENODEV; | 543 | return -ENODEV; |
551 | cam = video_get_drvdata(vdev); | 544 | cam = video_get_drvdata(vdev); |
552 | 545 | ||
553 | if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
554 | return -EINVAL; | ||
555 | if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) | 546 | if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) |
556 | return -EINVAL; | 547 | return -EINVAL; |
557 | if (f->fmt.pix.field != V4L2_FIELD_ANY && | 548 | if (f->fmt.pix.field != V4L2_FIELD_ANY && |
@@ -577,10 +568,6 @@ static int zr364xx_vidioc_g_fmt_vid_cap(struct file *file, void *priv, | |||
577 | return -ENODEV; | 568 | return -ENODEV; |
578 | cam = video_get_drvdata(vdev); | 569 | cam = video_get_drvdata(vdev); |
579 | 570 | ||
580 | if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
581 | return -EINVAL; | ||
582 | memset(&f->fmt.pix, 0, sizeof(struct v4l2_pix_format)); | ||
583 | f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
584 | f->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG; | 571 | f->fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG; |
585 | f->fmt.pix.field = V4L2_FIELD_NONE; | 572 | f->fmt.pix.field = V4L2_FIELD_NONE; |
586 | f->fmt.pix.width = cam->width; | 573 | f->fmt.pix.width = cam->width; |
@@ -602,8 +589,6 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv, | |||
602 | return -ENODEV; | 589 | return -ENODEV; |
603 | cam = video_get_drvdata(vdev); | 590 | cam = video_get_drvdata(vdev); |
604 | 591 | ||
605 | if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
606 | return -EINVAL; | ||
607 | if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) | 592 | if (f->fmt.pix.pixelformat != V4L2_PIX_FMT_JPEG) |
608 | return -EINVAL; | 593 | return -EINVAL; |
609 | if (f->fmt.pix.field != V4L2_FIELD_ANY && | 594 | if (f->fmt.pix.field != V4L2_FIELD_ANY && |