Skip to content

Commit

Permalink
xHCI: use gfp flags from caller instead of GFP_ATOMIC
Browse files Browse the repository at this point in the history
The caller is allowed to specify the GFP flags for these functions.
We should prefer their flags unless we have good reason.  For
example, if we take a spin_lock ourselves we'd need to use
GFP_ATOMIC.  But in this case it's safe to use the callers GFP
flags.

The callers all pass GFP_ATOMIC here, so this change doesn't affect
how the kernel behaves but we may add other callers later and this
is a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
  • Loading branch information
Dan Carpenter authored and Sarah Sharp committed Apr 11, 2012
1 parent 457a4f6 commit 3fc8206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,7 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
urb->dev->speed == USB_SPEED_FULL)
urb->interval /= 8;
}
return xhci_queue_bulk_tx(xhci, GFP_ATOMIC, urb, slot_id, ep_index);
return xhci_queue_bulk_tx(xhci, mem_flags, urb, slot_id, ep_index);
}

/*
Expand Down Expand Up @@ -3514,7 +3514,7 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
}
ep_ring->num_trbs_free_temp = ep_ring->num_trbs_free;

return xhci_queue_isoc_tx(xhci, GFP_ATOMIC, urb, slot_id, ep_index);
return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index);
}

/**** Command Ring Operations ****/
Expand Down

0 comments on commit 3fc8206

Please sign in to comment.