From f95c4c0186aa94ad41681d8f0ecd79cc45f92bda Mon Sep 17 00:00:00 2001 From: Cliff Cai Date: Tue, 15 Dec 2009 11:08:44 +0200 Subject: [PATCH] USB: musb: fix compiling warning with min() macro Current musb gadget dma code produces the warning: drivers/usb/musb/musb_gadget.c: In function 'txstate': drivers/usb/musb/musb_gadget.c:312: warning: comparison of distinct pointer types lacks a cast So switch to min_t(size_t, ...). Signed-off-by: Cliff Cai Signed-off-by: Mike Frysinger Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 4dea14609252..0c36925c5934 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -309,7 +309,7 @@ static void txstate(struct musb *musb, struct musb_request *req) size_t request_size; /* setup DMA, then program endpoint CSR */ - request_size = min(request->length, + request_size = min_t(size_t, request->length, musb_ep->dma->max_len); if (request_size < musb_ep->packet_sz) musb_ep->dma->desired_mode = 0;