Commit 37730ecc authored by Felipe Balbi's avatar Felipe Balbi

usb: musb: gadget: fix compile warning

Fix the following compile warning:

drivers/usb/musb/musb_gadget.c: In function ‘rxstate’:
drivers/usb/musb/musb_gadget.c:714:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent cc506036
...@@ -627,7 +627,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) ...@@ -627,7 +627,7 @@ static void rxstate(struct musb *musb, struct musb_request *req)
struct dma_controller *c; struct dma_controller *c;
struct dma_channel *channel; struct dma_channel *channel;
int use_dma = 0; int use_dma = 0;
int transfer_size; unsigned int transfer_size;
c = musb->dma_controller; c = musb->dma_controller;
channel = musb_ep->dma; channel = musb_ep->dma;
...@@ -669,10 +669,11 @@ static void rxstate(struct musb *musb, struct musb_request *req) ...@@ -669,10 +669,11 @@ static void rxstate(struct musb *musb, struct musb_request *req)
csr | MUSB_RXCSR_DMAMODE); csr | MUSB_RXCSR_DMAMODE);
musb_writew(epio, MUSB_RXCSR, csr); musb_writew(epio, MUSB_RXCSR, csr);
transfer_size = min(request->length - request->actual, transfer_size = min_t(unsigned int,
request->length -
request->actual,
channel->max_len); channel->max_len);
musb_ep->dma->desired_mode = 1; musb_ep->dma->desired_mode = 1;
} else { } else {
if (!musb_ep->hb_mult && if (!musb_ep->hb_mult &&
musb_ep->hw_ep->rx_double_buffered) musb_ep->hw_ep->rx_double_buffered)
...@@ -702,7 +703,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) ...@@ -702,7 +703,7 @@ static void rxstate(struct musb *musb, struct musb_request *req)
struct dma_controller *c; struct dma_controller *c;
struct dma_channel *channel; struct dma_channel *channel;
int transfer_size = 0; unsigned int transfer_size = 0;
c = musb->dma_controller; c = musb->dma_controller;
channel = musb_ep->dma; channel = musb_ep->dma;
...@@ -711,11 +712,13 @@ static void rxstate(struct musb *musb, struct musb_request *req) ...@@ -711,11 +712,13 @@ static void rxstate(struct musb *musb, struct musb_request *req)
if (fifo_count < musb_ep->packet_sz) if (fifo_count < musb_ep->packet_sz)
transfer_size = fifo_count; transfer_size = fifo_count;
else if (request->short_not_ok) else if (request->short_not_ok)
transfer_size = min(request->length - transfer_size = min_t(unsigned int,
request->length -
request->actual, request->actual,
channel->max_len); channel->max_len);
else else
transfer_size = min(request->length - transfer_size = min_t(unsigned int,
request->length -
request->actual, request->actual,
(unsigned)fifo_count); (unsigned)fifo_count);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment