aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/m66592-udc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/m66592-udc.c')
-rw-r--r--drivers/usb/gadget/m66592-udc.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 491f825ed5c9..91d0af2a24a8 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -8,16 +8,6 @@
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License. 10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 *
21 */ 11 */
22 12
23#include <linux/module.h> 13#include <linux/module.h>
@@ -370,7 +360,7 @@ static void m66592_ep_setting(struct m66592 *m66592, struct m66592_ep *ep,
370 360
371 ep->pipectr = get_pipectr_addr(pipenum); 361 ep->pipectr = get_pipectr_addr(pipenum);
372 ep->pipenum = pipenum; 362 ep->pipenum = pipenum;
373 ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize); 363 ep->ep.maxpacket = usb_endpoint_maxp(desc);
374 m66592->pipenum2ep[pipenum] = ep; 364 m66592->pipenum2ep[pipenum] = ep;
375 m66592->epaddr2ep[desc->bEndpointAddress&USB_ENDPOINT_NUMBER_MASK] = ep; 365 m66592->epaddr2ep[desc->bEndpointAddress&USB_ENDPOINT_NUMBER_MASK] = ep;
376 INIT_LIST_HEAD(&ep->queue); 366 INIT_LIST_HEAD(&ep->queue);
@@ -447,7 +437,7 @@ static int alloc_pipe_config(struct m66592_ep *ep,
447 ep->type = info.type; 437 ep->type = info.type;
448 438
449 info.epnum = desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; 439 info.epnum = desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
450 info.maxpacket = le16_to_cpu(desc->wMaxPacketSize); 440 info.maxpacket = usb_endpoint_maxp(desc);
451 info.interval = desc->bInterval; 441 info.interval = desc->bInterval;
452 if (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) 442 if (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
453 info.dir_in = 1; 443 info.dir_in = 1;
@@ -1674,7 +1664,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1674 m66592->timer.data = (unsigned long)m66592; 1664 m66592->timer.data = (unsigned long)m66592;
1675 m66592->reg = reg; 1665 m66592->reg = reg;
1676 1666
1677 ret = request_irq(ires->start, m66592_irq, IRQF_DISABLED | IRQF_SHARED, 1667 ret = request_irq(ires->start, m66592_irq, IRQF_SHARED,
1678 udc_name, m66592); 1668 udc_name, m66592);
1679 if (ret < 0) { 1669 if (ret < 0) {
1680 pr_err("request_irq error (%d)\n", ret); 1670 pr_err("request_irq error (%d)\n", ret);