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:

committed by
Greg Kroah-Hartman

父節點
5fd29937de
當前提交
14d49b7a0b
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user