diff options
Diffstat (limited to 'drivers/usb/class/cdc-wdm.c')
-rw-r--r-- | drivers/usb/class/cdc-wdm.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 189141ca4e05..094c76b5de17 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c | |||
@@ -276,14 +276,14 @@ static void free_urbs(struct wdm_device *desc) | |||
276 | 276 | ||
277 | static void cleanup(struct wdm_device *desc) | 277 | static void cleanup(struct wdm_device *desc) |
278 | { | 278 | { |
279 | usb_buffer_free(interface_to_usbdev(desc->intf), | 279 | usb_free_coherent(interface_to_usbdev(desc->intf), |
280 | desc->wMaxPacketSize, | 280 | desc->wMaxPacketSize, |
281 | desc->sbuf, | 281 | desc->sbuf, |
282 | desc->validity->transfer_dma); | 282 | desc->validity->transfer_dma); |
283 | usb_buffer_free(interface_to_usbdev(desc->intf), | 283 | usb_free_coherent(interface_to_usbdev(desc->intf), |
284 | desc->wMaxCommand, | 284 | desc->wMaxCommand, |
285 | desc->inbuf, | 285 | desc->inbuf, |
286 | desc->response->transfer_dma); | 286 | desc->response->transfer_dma); |
287 | kfree(desc->orq); | 287 | kfree(desc->orq); |
288 | kfree(desc->irq); | 288 | kfree(desc->irq); |
289 | kfree(desc->ubuf); | 289 | kfree(desc->ubuf); |
@@ -705,17 +705,17 @@ next_desc: | |||
705 | if (!desc->ubuf) | 705 | if (!desc->ubuf) |
706 | goto err; | 706 | goto err; |
707 | 707 | ||
708 | desc->sbuf = usb_buffer_alloc(interface_to_usbdev(intf), | 708 | desc->sbuf = usb_alloc_coherent(interface_to_usbdev(intf), |
709 | desc->wMaxPacketSize, | 709 | desc->wMaxPacketSize, |
710 | GFP_KERNEL, | 710 | GFP_KERNEL, |
711 | &desc->validity->transfer_dma); | 711 | &desc->validity->transfer_dma); |
712 | if (!desc->sbuf) | 712 | if (!desc->sbuf) |
713 | goto err; | 713 | goto err; |
714 | 714 | ||
715 | desc->inbuf = usb_buffer_alloc(interface_to_usbdev(intf), | 715 | desc->inbuf = usb_alloc_coherent(interface_to_usbdev(intf), |
716 | desc->bMaxPacketSize0, | 716 | desc->bMaxPacketSize0, |
717 | GFP_KERNEL, | 717 | GFP_KERNEL, |
718 | &desc->response->transfer_dma); | 718 | &desc->response->transfer_dma); |
719 | if (!desc->inbuf) | 719 | if (!desc->inbuf) |
720 | goto err2; | 720 | goto err2; |
721 | 721 | ||
@@ -742,15 +742,15 @@ out: | |||
742 | return rv; | 742 | return rv; |
743 | err3: | 743 | err3: |
744 | usb_set_intfdata(intf, NULL); | 744 | usb_set_intfdata(intf, NULL); |
745 | usb_buffer_free(interface_to_usbdev(desc->intf), | 745 | usb_free_coherent(interface_to_usbdev(desc->intf), |
746 | desc->bMaxPacketSize0, | 746 | desc->bMaxPacketSize0, |
747 | desc->inbuf, | 747 | desc->inbuf, |
748 | desc->response->transfer_dma); | 748 | desc->response->transfer_dma); |
749 | err2: | 749 | err2: |
750 | usb_buffer_free(interface_to_usbdev(desc->intf), | 750 | usb_free_coherent(interface_to_usbdev(desc->intf), |
751 | desc->wMaxPacketSize, | 751 | desc->wMaxPacketSize, |
752 | desc->sbuf, | 752 | desc->sbuf, |
753 | desc->validity->transfer_dma); | 753 | desc->validity->transfer_dma); |
754 | err: | 754 | err: |
755 | free_urbs(desc); | 755 | free_urbs(desc); |
756 | kfree(desc->ubuf); | 756 | kfree(desc->ubuf); |