diff options
Diffstat (limited to 'drivers/usb/gadget/amd5536udc.c')
-rw-r--r-- | drivers/usb/gadget/amd5536udc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index 54a1e2954cea..41b062eb4de0 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
43 | #include <linux/init.h> | ||
44 | #include <linux/timer.h> | 43 | #include <linux/timer.h> |
45 | #include <linux/list.h> | 44 | #include <linux/list.h> |
46 | #include <linux/interrupt.h> | 45 | #include <linux/interrupt.h> |
@@ -446,7 +445,7 @@ static void ep_init(struct udc_regs __iomem *regs, struct udc_ep *ep) | |||
446 | ep->ep.ops = &udc_ep_ops; | 445 | ep->ep.ops = &udc_ep_ops; |
447 | INIT_LIST_HEAD(&ep->queue); | 446 | INIT_LIST_HEAD(&ep->queue); |
448 | 447 | ||
449 | ep->ep.maxpacket = (u16) ~0; | 448 | usb_ep_set_maxpacket_limit(&ep->ep,(u16) ~0); |
450 | /* set NAK */ | 449 | /* set NAK */ |
451 | tmp = readl(&ep->regs->ctl); | 450 | tmp = readl(&ep->regs->ctl); |
452 | tmp |= AMD_BIT(UDC_EPCTL_SNAK); | 451 | tmp |= AMD_BIT(UDC_EPCTL_SNAK); |
@@ -1564,12 +1563,15 @@ static void udc_setup_endpoints(struct udc *dev) | |||
1564 | } | 1563 | } |
1565 | /* EP0 max packet */ | 1564 | /* EP0 max packet */ |
1566 | if (dev->gadget.speed == USB_SPEED_FULL) { | 1565 | if (dev->gadget.speed == USB_SPEED_FULL) { |
1567 | dev->ep[UDC_EP0IN_IX].ep.maxpacket = UDC_FS_EP0IN_MAX_PKT_SIZE; | 1566 | usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0IN_IX].ep, |
1568 | dev->ep[UDC_EP0OUT_IX].ep.maxpacket = | 1567 | UDC_FS_EP0IN_MAX_PKT_SIZE); |
1569 | UDC_FS_EP0OUT_MAX_PKT_SIZE; | 1568 | usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0OUT_IX].ep, |
1569 | UDC_FS_EP0OUT_MAX_PKT_SIZE); | ||
1570 | } else if (dev->gadget.speed == USB_SPEED_HIGH) { | 1570 | } else if (dev->gadget.speed == USB_SPEED_HIGH) { |
1571 | dev->ep[UDC_EP0IN_IX].ep.maxpacket = UDC_EP0IN_MAX_PKT_SIZE; | 1571 | usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0IN_IX].ep, |
1572 | dev->ep[UDC_EP0OUT_IX].ep.maxpacket = UDC_EP0OUT_MAX_PKT_SIZE; | 1572 | UDC_EP0IN_MAX_PKT_SIZE); |
1573 | usb_ep_set_maxpacket_limit(&dev->ep[UDC_EP0OUT_IX].ep, | ||
1574 | UDC_EP0OUT_MAX_PKT_SIZE); | ||
1573 | } | 1575 | } |
1574 | 1576 | ||
1575 | /* | 1577 | /* |
@@ -3338,7 +3340,7 @@ static int udc_remote_wakeup(struct udc *dev) | |||
3338 | } | 3340 | } |
3339 | 3341 | ||
3340 | /* PCI device parameters */ | 3342 | /* PCI device parameters */ |
3341 | static DEFINE_PCI_DEVICE_TABLE(pci_id) = { | 3343 | static const struct pci_device_id pci_id[] = { |
3342 | { | 3344 | { |
3343 | PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x2096), | 3345 | PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x2096), |
3344 | .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe, | 3346 | .class = (PCI_CLASS_SERIAL_USB << 8) | 0xfe, |