/* * u_f.c -- USB function utilities for Gadget stack * * Copyright (c) 2013 Samsung Electronics Co., Ltd. * http://www.samsung.com * * Author: Andrzej Pietrasiewicz * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include "u_f.h" #include struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len) { struct usb_request *req; req = usb_ep_alloc_request(ep, GFP_ATOMIC); if (req) { req->length = usb_endpoint_dir_out(ep->desc) ? usb_ep_align(ep, len) : len; req->buf = kmalloc(req->length, GFP_ATOMIC); if (!req->buf) { usb_ep_free_request(ep, req); req = NULL; } } return req; } EXPORT_SYMBOL_GPL(alloc_ep_req); ='/cgit.cgi/linux/net-next.git/'>net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-31 13:05:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-31 13:05:15 -0800
commitc9194b99ae1825bdbafc701965442a47739ff0ad (patch)
tree76dbb4da02aea1ba8bd886b7b2c53fdb26202710 /drivers/usb
parent415f9b71d17d294c2f2075b3fc7717d72e5e48f9 (diff)
parent8e9faa15469ed7c7467423db4c62aeed3ff4cae3 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID fixes from Jiri Kosina: - regression fix (sleeping while atomic) for cp2112, from Johan Hovold - regression fix for proximity handling under certain circumstances in Wacom driver, from Jason Gerecke - functional fix for Logitech Rumblepad 2, from Ardinartsev Nikita * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: cp2112: fix gpio-callback error handling HID: cp2112: fix sleep-while-atomic HID: hid-lg: Fix immediate disconnection of Logitech Rumblepad 2 HID: usbhid: Quirk a AMI virtual mouse and keyboard with ALWAYS_POLL HID: wacom: Fix poor prox handling in 'wacom_pl_irq'
Diffstat (limited to 'drivers/usb')