aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-12-08 17:59:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-08 17:43:52 +0100
commit103afda0e6ac58927bc85dc5a7ebc0f51892f407 (patch)
tree77a35aee18fae56739125167c83d4c8257b54a3e /drivers/usb/host/xhci-mem.c
parentxhci: add helper to allocate command with input context (diff)
downloadwireguard-linux-103afda0e6ac58927bc85dc5a7ebc0f51892f407.tar.xz
wireguard-linux-103afda0e6ac58927bc85dc5a7ebc0f51892f407.zip
xhci: remove unnecessary boolean parameter from xhci_alloc_command
commands with input contexts are allocated with the xhci_alloc_command_with_ctx helper. No functional changes Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 7ab4020336f3..824651cf02ad 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1701,8 +1701,7 @@ static void scratchpad_free(struct xhci_hcd *xhci)
}
struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci,
- bool allocate_in_ctx, bool allocate_completion,
- gfp_t mem_flags)
+ bool allocate_completion, gfp_t mem_flags)
{
struct xhci_command *command;
@@ -1710,21 +1709,10 @@ struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci,
if (!command)
return NULL;
- if (allocate_in_ctx) {
- command->in_ctx =
- xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_INPUT,
- mem_flags);
- if (!command->in_ctx) {
- kfree(command);
- return NULL;
- }
- }
-
if (allocate_completion) {
command->completion =
kzalloc(sizeof(struct completion), mem_flags);
if (!command->completion) {
- xhci_free_container_ctx(xhci, command->in_ctx);
kfree(command);
return NULL;
}
@@ -1741,8 +1729,7 @@ struct xhci_command *xhci_alloc_command_with_ctx(struct xhci_hcd *xhci,
{
struct xhci_command *command;
- command = xhci_alloc_command(xhci, false, allocate_completion,
- mem_flags);
+ command = xhci_alloc_command(xhci, allocate_completion, mem_flags);
if (!command)
return NULL;