[PATCH 08/12] usb: chipidea: udc: use gfp_flags in _hardware_enqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The option gfp_flags is prepared in ep_queue and currently
not used. This patch propagates the flag through all users
down to the dma_pool_alloc function to consume it.

Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
---
 drivers/usb/chipidea/udc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 720e31e..834aa7e 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -397,7 +397,7 @@ static void vbus_work(struct work_struct *work)
  *
  * This function returns an error code
  */
-static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
+static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq, gfp_t gfp_flags)
 {
 	struct ci13xxx *ci = mEp->ci;
 	unsigned i;
@@ -411,7 +411,7 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
 	mReq->req.status = -EALREADY;
 
 	if (mReq->req.zero && length && (length % mEp->ep.maxpacket == 0)) {
-		mReq->zptr = dma_pool_alloc(mEp->td_pool, GFP_ATOMIC,
+		mReq->zptr = dma_pool_alloc(mEp->td_pool, gfp_flags,
 					   &mReq->zdma);
 		if (mReq->zptr == NULL)
 			return -ENOMEM;
@@ -662,7 +662,7 @@ static void isr_get_status_complete(struct usb_ep *ep, struct usb_request *req)
  * Caller must hold lock
  */
 static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
-		    gfp_t __maybe_unused gfp_flags)
+		    gfp_t gfp_flags)
 {
 	struct ci13xxx_ep  *mEp  = container_of(ep,  struct ci13xxx_ep, ep);
 	struct ci13xxx_req *mReq = container_of(req, struct ci13xxx_req, req);
@@ -703,7 +703,7 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
 	mReq->req.status = -EINPROGRESS;
 	mReq->req.actual = 0;
 
-	retval = _hardware_enqueue(mEp, mReq);
+	retval = _hardware_enqueue(mEp, mReq, gfp_flags);
 
 	if (retval == -EALREADY) {
 		trace_ci_ep_queue_req(mEp, retval);
@@ -1215,7 +1215,7 @@ static void ep_free_request(struct usb_ep *ep, struct usb_request *req)
  * Check usb_ep_queue()* at usb_gadget.h" for details
  */
 static int ep_queue(struct usb_ep *ep, struct usb_request *req,
-		    gfp_t __maybe_unused gfp_flags)
+		    gfp_t gfp_flags)
 {
 	struct ci13xxx_ep  *mEp  = container_of(ep,  struct ci13xxx_ep, ep);
 	int retval = 0;
-- 
1.8.2.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux