aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-wdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r--drivers/usb/class/cdc-wdm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index 2b9ff518b509..efe684908c1f 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -682,7 +682,7 @@ next_desc:
682 if (!ep || !usb_endpoint_is_int_in(ep)) 682 if (!ep || !usb_endpoint_is_int_in(ep))
683 goto err; 683 goto err;
684 684
685 desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize); 685 desc->wMaxPacketSize = usb_endpoint_maxp(ep);
686 desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0; 686 desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0;
687 687
688 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); 688 desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
@@ -798,11 +798,11 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
798 dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor); 798 dev_dbg(&desc->intf->dev, "wdm%d_suspend\n", intf->minor);
799 799
800 /* if this is an autosuspend the caller does the locking */ 800 /* if this is an autosuspend the caller does the locking */
801 if (!(message.event & PM_EVENT_AUTO)) 801 if (!PMSG_IS_AUTO(message))
802 mutex_lock(&desc->lock); 802 mutex_lock(&desc->lock);
803 spin_lock_irq(&desc->iuspin); 803 spin_lock_irq(&desc->iuspin);
804 804
805 if ((message.event & PM_EVENT_AUTO) && 805 if (PMSG_IS_AUTO(message) &&
806 (test_bit(WDM_IN_USE, &desc->flags) 806 (test_bit(WDM_IN_USE, &desc->flags)
807 || test_bit(WDM_RESPONDING, &desc->flags))) { 807 || test_bit(WDM_RESPONDING, &desc->flags))) {
808 spin_unlock_irq(&desc->iuspin); 808 spin_unlock_irq(&desc->iuspin);
@@ -815,7 +815,7 @@ static int wdm_suspend(struct usb_interface *intf, pm_message_t message)
815 kill_urbs(desc); 815 kill_urbs(desc);
816 cancel_work_sync(&desc->rxwork); 816 cancel_work_sync(&desc->rxwork);
817 } 817 }
818 if (!(message.event & PM_EVENT_AUTO)) 818 if (!PMSG_IS_AUTO(message))
819 mutex_unlock(&desc->lock); 819 mutex_unlock(&desc->lock);
820 820
821 return rv; 821 return rv;