diff options
Diffstat (limited to 'drivers/input/misc/yealink.c')
-rw-r--r-- | drivers/input/misc/yealink.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 2828328e9dd0..41201c6b5e68 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c | |||
@@ -836,10 +836,8 @@ static int usb_cleanup(struct yealink_dev *yld, int err) | |||
836 | usb_free_urb(yld->urb_ctl); | 836 | usb_free_urb(yld->urb_ctl); |
837 | 837 | ||
838 | kfree(yld->ctl_req); | 838 | kfree(yld->ctl_req); |
839 | usb_buffer_free(yld->udev, USB_PKT_LEN, | 839 | usb_free_coherent(yld->udev, USB_PKT_LEN, yld->ctl_data, yld->ctl_dma); |
840 | yld->ctl_data, yld->ctl_dma); | 840 | usb_free_coherent(yld->udev, USB_PKT_LEN, yld->irq_data, yld->irq_dma); |
841 | usb_buffer_free(yld->udev, USB_PKT_LEN, | ||
842 | yld->irq_data, yld->irq_dma); | ||
843 | 841 | ||
844 | kfree(yld); | 842 | kfree(yld); |
845 | return err; | 843 | return err; |
@@ -884,13 +882,13 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
884 | return usb_cleanup(yld, -ENOMEM); | 882 | return usb_cleanup(yld, -ENOMEM); |
885 | 883 | ||
886 | /* allocate usb buffers */ | 884 | /* allocate usb buffers */ |
887 | yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN, | 885 | yld->irq_data = usb_alloc_coherent(udev, USB_PKT_LEN, |
888 | GFP_ATOMIC, &yld->irq_dma); | 886 | GFP_ATOMIC, &yld->irq_dma); |
889 | if (yld->irq_data == NULL) | 887 | if (yld->irq_data == NULL) |
890 | return usb_cleanup(yld, -ENOMEM); | 888 | return usb_cleanup(yld, -ENOMEM); |
891 | 889 | ||
892 | yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN, | 890 | yld->ctl_data = usb_alloc_coherent(udev, USB_PKT_LEN, |
893 | GFP_ATOMIC, &yld->ctl_dma); | 891 | GFP_ATOMIC, &yld->ctl_dma); |
894 | if (!yld->ctl_data) | 892 | if (!yld->ctl_data) |
895 | return usb_cleanup(yld, -ENOMEM); | 893 | return usb_cleanup(yld, -ENOMEM); |
896 | 894 | ||