aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWill Newton <will.newton@gmail.com>2008-08-12 10:39:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:41:07 -0400
commit224b50390104af7602871894540d94cc759dc4c0 (patch)
tree64043c76cb2fdb14b949f0d7f851c1f3802d4942 /drivers
parent825bee3a3340e720485ef4bde98cbb62e18cb547 (diff)
fsl_usb2_udc: Make fsl_queue_td return type void.
fsl_queue_td always returns 0. Make it void and remove checks for non-zero return in callers. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/fsl_usb2_udc.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index 204cf38c63fb..6f6272031344 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -592,7 +592,7 @@ static void fsl_free_request(struct usb_ep *_ep, struct usb_request *_req)
592} 592}
593 593
594/*-------------------------------------------------------------------------*/ 594/*-------------------------------------------------------------------------*/
595static int fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req) 595static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
596{ 596{
597 int i = ep_index(ep) * 2 + ep_is_in(ep); 597 int i = ep_index(ep) * 2 + ep_is_in(ep);
598 u32 temp, bitmask, tmp_stat; 598 u32 temp, bitmask, tmp_stat;
@@ -649,7 +649,7 @@ static int fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
649 : (1 << (ep_index(ep))); 649 : (1 << (ep_index(ep)));
650 fsl_writel(temp, &dr_regs->endpointprime); 650 fsl_writel(temp, &dr_regs->endpointprime);
651out: 651out:
652 return 0; 652 return;
653} 653}
654 654
655/* Fill in the dTD structure 655/* Fill in the dTD structure
@@ -1136,7 +1136,6 @@ static int ep0_prime_status(struct fsl_udc *udc, int direction)
1136{ 1136{
1137 struct fsl_req *req = udc->status_req; 1137 struct fsl_req *req = udc->status_req;
1138 struct fsl_ep *ep; 1138 struct fsl_ep *ep;
1139 int status = 0;
1140 1139
1141 if (direction == EP_DIR_IN) 1140 if (direction == EP_DIR_IN)
1142 udc->ep0_dir = USB_DIR_IN; 1141 udc->ep0_dir = USB_DIR_IN;
@@ -1154,15 +1153,13 @@ static int ep0_prime_status(struct fsl_udc *udc, int direction)
1154 req->dtd_count = 0; 1153 req->dtd_count = 0;
1155 1154
1156 if (fsl_req_to_dtd(req) == 0) 1155 if (fsl_req_to_dtd(req) == 0)
1157 status = fsl_queue_td(ep, req); 1156 fsl_queue_td(ep, req);
1158 else 1157 else
1159 return -ENOMEM; 1158 return -ENOMEM;
1160 1159
1161 if (status)
1162 ERR("Can't queue ep0 status request\n");
1163 list_add_tail(&req->queue, &ep->queue); 1160 list_add_tail(&req->queue, &ep->queue);
1164 1161
1165 return status; 1162 return 0;
1166} 1163}
1167 1164
1168static void udc_reset_ep_queue(struct fsl_udc *udc, u8 pipe) 1165static void udc_reset_ep_queue(struct fsl_udc *udc, u8 pipe)
@@ -1194,10 +1191,8 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value,
1194 u16 index, u16 length) 1191 u16 index, u16 length)
1195{ 1192{
1196 u16 tmp = 0; /* Status, cpu endian */ 1193 u16 tmp = 0; /* Status, cpu endian */
1197
1198 struct fsl_req *req; 1194 struct fsl_req *req;
1199 struct fsl_ep *ep; 1195 struct fsl_ep *ep;
1200 int status = 0;
1201 1196
1202 ep = &udc->eps[0]; 1197 ep = &udc->eps[0];
1203 1198
@@ -1236,14 +1231,10 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value,
1236 1231
1237 /* prime the data phase */ 1232 /* prime the data phase */
1238 if ((fsl_req_to_dtd(req) == 0)) 1233 if ((fsl_req_to_dtd(req) == 0))
1239 status = fsl_queue_td(ep, req); 1234 fsl_queue_td(ep, req);
1240 else /* no mem */ 1235 else /* no mem */
1241 goto stall; 1236 goto stall;
1242 1237
1243 if (status) {
1244 ERR("Can't respond to getstatus request\n");
1245 goto stall;
1246 }
1247 list_add_tail(&req->queue, &ep->queue); 1238 list_add_tail(&req->queue, &ep->queue);
1248 udc->ep0_state = DATA_STATE_XMIT; 1239 udc->ep0_state = DATA_STATE_XMIT;
1249 return; 1240 return;