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>
This commit is contained in:
Mathias Nyman
2017-12-08 17:59:08 +02:00
committed by Greg Kroah-Hartman
parent 14d49b7a0b
commit 103afda0e6
5 changed files with 16 additions and 31 deletions

View File

@@ -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;