mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 09:36:42 +07:00
e79bfcb795
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
688 B
C
31 lines
688 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* u_f.c -- USB function utilities for Gadget stack
|
|
*
|
|
* Copyright (c) 2013 Samsung Electronics Co., Ltd.
|
|
* http://www.samsung.com
|
|
*
|
|
* Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
|
*/
|
|
|
|
#include "u_f.h"
|
|
#include <linux/usb/ch9.h>
|
|
|
|
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);
|