diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-03-01 20:46:32 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:18:22 +0200 |
commit | 6854bcdc6ff92e3a9c24940a3c5ebb446950c974 (patch) | |
tree | 904756f4e0e7e1d569ad086f91cfd69c92b5b095 | |
parent | 326b0e613bc858434198120a17d34308f82c27a8 (diff) | |
download | op-kernel-dev-6854bcdc6ff92e3a9c24940a3c5ebb446950c974.zip op-kernel-dev-6854bcdc6ff92e3a9c24940a3c5ebb446950c974.tar.gz |
usb: gadget: uvc: Use GFP_ATOMIC under spin lock
Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>
Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/uvc_video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/uvc_video.c b/drivers/usb/gadget/uvc_video.c index fac99a9..ec4bcc4 100644 --- a/drivers/usb/gadget/uvc_video.c +++ b/drivers/usb/gadget/uvc_video.c @@ -314,7 +314,8 @@ uvc_video_pump(struct uvc_video *video) video->encode(req, video, buf); /* Queue the USB request */ - if ((ret = usb_ep_queue(video->ep, req, GFP_KERNEL)) < 0) { + ret = usb_ep_queue(video->ep, req, GFP_ATOMIC); + if (ret < 0) { printk(KERN_INFO "Failed to queue request (%d)\n", ret); usb_ep_set_halt(video->ep); spin_unlock_irqrestore(&video->queue.irqlock, flags); |