diff options
Diffstat (limited to 'drivers/net/can/usb/ems_usb.c')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index df0a6369d2f2..1fc0871d2ef7 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -512,8 +512,8 @@ static void ems_usb_write_bulk_callback(struct urb *urb) | |||
512 | netdev = dev->netdev; | 512 | netdev = dev->netdev; |
513 | 513 | ||
514 | /* free up our allocated buffer */ | 514 | /* free up our allocated buffer */ |
515 | usb_buffer_free(urb->dev, urb->transfer_buffer_length, | 515 | usb_free_coherent(urb->dev, urb->transfer_buffer_length, |
516 | urb->transfer_buffer, urb->transfer_dma); | 516 | urb->transfer_buffer, urb->transfer_dma); |
517 | 517 | ||
518 | atomic_dec(&dev->active_tx_urbs); | 518 | atomic_dec(&dev->active_tx_urbs); |
519 | 519 | ||
@@ -610,8 +610,8 @@ static int ems_usb_start(struct ems_usb *dev) | |||
610 | return -ENOMEM; | 610 | return -ENOMEM; |
611 | } | 611 | } |
612 | 612 | ||
613 | buf = usb_buffer_alloc(dev->udev, RX_BUFFER_SIZE, GFP_KERNEL, | 613 | buf = usb_alloc_coherent(dev->udev, RX_BUFFER_SIZE, GFP_KERNEL, |
614 | &urb->transfer_dma); | 614 | &urb->transfer_dma); |
615 | if (!buf) { | 615 | if (!buf) { |
616 | dev_err(netdev->dev.parent, | 616 | dev_err(netdev->dev.parent, |
617 | "No memory left for USB buffer\n"); | 617 | "No memory left for USB buffer\n"); |
@@ -631,8 +631,8 @@ static int ems_usb_start(struct ems_usb *dev) | |||
631 | netif_device_detach(dev->netdev); | 631 | netif_device_detach(dev->netdev); |
632 | 632 | ||
633 | usb_unanchor_urb(urb); | 633 | usb_unanchor_urb(urb); |
634 | usb_buffer_free(dev->udev, RX_BUFFER_SIZE, buf, | 634 | usb_free_coherent(dev->udev, RX_BUFFER_SIZE, buf, |
635 | urb->transfer_dma); | 635 | urb->transfer_dma); |
636 | break; | 636 | break; |
637 | } | 637 | } |
638 | 638 | ||
@@ -773,7 +773,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne | |||
773 | goto nomem; | 773 | goto nomem; |
774 | } | 774 | } |
775 | 775 | ||
776 | buf = usb_buffer_alloc(dev->udev, size, GFP_ATOMIC, &urb->transfer_dma); | 776 | buf = usb_alloc_coherent(dev->udev, size, GFP_ATOMIC, &urb->transfer_dma); |
777 | if (!buf) { | 777 | if (!buf) { |
778 | dev_err(netdev->dev.parent, "No memory left for USB buffer\n"); | 778 | dev_err(netdev->dev.parent, "No memory left for USB buffer\n"); |
779 | usb_free_urb(urb); | 779 | usb_free_urb(urb); |
@@ -816,7 +816,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne | |||
816 | */ | 816 | */ |
817 | if (!context) { | 817 | if (!context) { |
818 | usb_unanchor_urb(urb); | 818 | usb_unanchor_urb(urb); |
819 | usb_buffer_free(dev->udev, size, buf, urb->transfer_dma); | 819 | usb_free_coherent(dev->udev, size, buf, urb->transfer_dma); |
820 | 820 | ||
821 | dev_warn(netdev->dev.parent, "couldn't find free context\n"); | 821 | dev_warn(netdev->dev.parent, "couldn't find free context\n"); |
822 | 822 | ||
@@ -841,7 +841,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne | |||
841 | can_free_echo_skb(netdev, context->echo_index); | 841 | can_free_echo_skb(netdev, context->echo_index); |
842 | 842 | ||
843 | usb_unanchor_urb(urb); | 843 | usb_unanchor_urb(urb); |
844 | usb_buffer_free(dev->udev, size, buf, urb->transfer_dma); | 844 | usb_free_coherent(dev->udev, size, buf, urb->transfer_dma); |
845 | dev_kfree_skb(skb); | 845 | dev_kfree_skb(skb); |
846 | 846 | ||
847 | atomic_dec(&dev->active_tx_urbs); | 847 | atomic_dec(&dev->active_tx_urbs); |