aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-13 15:09:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-13 15:09:57 -0400
commit858655116bfc722837e3aec0909b8e9d08f96996 (patch)
treeef9171d51ffcd01e40d1131d62be32e5a7d371dc /drivers/usb
parent239dab4636f7f5f971ac39b5ca84254cff112cac (diff)
parent1b2c14b44adcb7836528640bfdc40bf7499d987d (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: "This series contain: - new i2c video drivers: ml86v7667 (video decoder), ths8200 (video encoder) - a new video driver for EasyCap cards based on Fushicai USBTV007 - Improved support for OF and embedded systems, with V4L2 async initialization and a better support for clocks - API cleanups on the ioctls used by the v4l2 debug tool - Lots of cleanups - As usual, several driver improvements and new cards additions - Revert two changesets that change the minimal symbol rate for stv0399, as request by Manu - Update MAINTAINERS and other files to point to my new e-mail" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (378 commits) MAINTAINERS & ABI: Update to point to my new email [media] stb0899: restore minimal rate to 5Mbauds [media] exynos4-is: Correct colorspace handling at FIMC-LITE [media] exynos4-is: Set valid initial format on FIMC.n subdevs [media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads [media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev [media] exynos4-is: Set valid initial format at FIMC-LITE [media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs [media] MAINTAINERS: Update S5P/Exynos FIMC driver entry [media] Documentation: Update driver's directory in video4linux/fimc.txt [media] exynos4-is: Change fimc-is firmware file names [media] exynos4-is: Add support for Exynos5250 MIPI-CSIS [media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver [media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms [media] media: i2c: tvp514x: remove manual setting of subdev name [media] media: i2c: tvp7002: remove manual setting of subdev name [media] mem2mem: set missing v4l2_dev pointer [media] wl128x: add missing struct v4l2_device [media] tvp514x: Fix init seqeunce [media] saa7134: Fix sparse warnings by adding __user annotation ...
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/f_uvc.c9
-rw-r--r--drivers/usb/gadget/uvc.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index 5f91c7a59946..e2a1f50bd93c 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -406,7 +406,7 @@ uvc_register_video(struct uvc_device *uvc)
406 if (video == NULL) 406 if (video == NULL)
407 return -ENOMEM; 407 return -ENOMEM;
408 408
409 video->parent = &cdev->gadget->dev; 409 video->v4l2_dev = &uvc->v4l2_dev;
410 video->fops = &uvc_v4l2_fops; 410 video->fops = &uvc_v4l2_fops;
411 video->release = video_device_release; 411 video->release = video_device_release;
412 strlcpy(video->name, cdev->gadget->name, sizeof(video->name)); 412 strlcpy(video->name, cdev->gadget->name, sizeof(video->name));
@@ -563,6 +563,7 @@ uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)
563 INFO(cdev, "uvc_function_unbind\n"); 563 INFO(cdev, "uvc_function_unbind\n");
564 564
565 video_unregister_device(uvc->vdev); 565 video_unregister_device(uvc->vdev);
566 v4l2_device_unregister(&uvc->v4l2_dev);
566 uvc->control_ep->driver_data = NULL; 567 uvc->control_ep->driver_data = NULL;
567 uvc->video.ep->driver_data = NULL; 568 uvc->video.ep->driver_data = NULL;
568 569
@@ -690,6 +691,11 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
690 if ((ret = usb_function_deactivate(f)) < 0) 691 if ((ret = usb_function_deactivate(f)) < 0)
691 goto error; 692 goto error;
692 693
694 if (v4l2_device_register(&cdev->gadget->dev, &uvc->v4l2_dev)) {
695 printk(KERN_INFO "v4l2_device_register failed\n");
696 goto error;
697 }
698
693 /* Initialise video. */ 699 /* Initialise video. */
694 ret = uvc_video_init(&uvc->video); 700 ret = uvc_video_init(&uvc->video);
695 if (ret < 0) 701 if (ret < 0)
@@ -705,6 +711,7 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f)
705 return 0; 711 return 0;
706 712
707error: 713error:
714 v4l2_device_unregister(&uvc->v4l2_dev);
708 if (uvc->vdev) 715 if (uvc->vdev)
709 video_device_release(uvc->vdev); 716 video_device_release(uvc->vdev);
710 717
diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h
index 817e9e19cecf..7a9111de8054 100644
--- a/drivers/usb/gadget/uvc.h
+++ b/drivers/usb/gadget/uvc.h
@@ -57,6 +57,7 @@ struct uvc_event
57#include <linux/videodev2.h> 57#include <linux/videodev2.h>
58#include <linux/version.h> 58#include <linux/version.h>
59#include <media/v4l2-fh.h> 59#include <media/v4l2-fh.h>
60#include <media/v4l2-device.h>
60 61
61#include "uvc_queue.h" 62#include "uvc_queue.h"
62 63
@@ -145,6 +146,7 @@ enum uvc_state
145struct uvc_device 146struct uvc_device
146{ 147{
147 struct video_device *vdev; 148 struct video_device *vdev;
149 struct v4l2_device v4l2_dev;
148 enum uvc_state state; 150 enum uvc_state state;
149 struct usb_function func; 151 struct usb_function func;
150 struct uvc_video video; 152 struct uvc_video video;