xhci: add helper to allocate command with input context

Add a xhci_alloc_command_with_ctx() helper to get rid of
one of the boolean parameters telling if a context should
be allocated with the command.

No functional changes, improves core readability

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:07 +02:00
committed by Greg Kroah-Hartman
父節點 5fd29937de
當前提交 14d49b7a0b
共有 3 個文件被更改,包括 26 次插入4 次删除

查看文件

@@ -3090,7 +3090,7 @@ static int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
return -ENOSYS;
}
config_cmd = xhci_alloc_command(xhci, true, true, mem_flags);
config_cmd = xhci_alloc_command_with_ctx(xhci, true, mem_flags);
if (!config_cmd)
return -ENOMEM;
@@ -4675,7 +4675,7 @@ static int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
return -EINVAL;
}
config_cmd = xhci_alloc_command(xhci, true, true, mem_flags);
config_cmd = xhci_alloc_command_with_ctx(xhci, true, mem_flags);
if (!config_cmd)
return -ENOMEM;