USB: rename usb_buffer_alloc() and usb_buffer_free() users
[linux-2.6.git] / drivers / net / usb / ipheth.c
index 418825d..197c352 100644 (file)
@@ -128,17 +128,13 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
        if (rx_urb == NULL)
                goto free_tx_urb;
 
-       tx_buf = usb_buffer_alloc(iphone->udev,
-                                 IPHETH_BUF_SIZE,
-                                 GFP_KERNEL,
-                                 &tx_urb->transfer_dma);
+       tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
+                                   GFP_KERNEL, &tx_urb->transfer_dma);
        if (tx_buf == NULL)
                goto free_rx_urb;
 
-       rx_buf = usb_buffer_alloc(iphone->udev,
-                                 IPHETH_BUF_SIZE,
-                                 GFP_KERNEL,
-                                 &rx_urb->transfer_dma);
+       rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
+                                   GFP_KERNEL, &rx_urb->transfer_dma);
        if (rx_buf == NULL)
                goto free_tx_buf;
 
@@ -150,8 +146,8 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
        return 0;
 
 free_tx_buf:
-       usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
-                       tx_urb->transfer_dma);
+       usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
+                         tx_urb->transfer_dma);
 free_rx_urb:
        usb_free_urb(rx_urb);
 free_tx_urb:
@@ -162,10 +158,10 @@ error_nomem:
 
 static void ipheth_free_urbs(struct ipheth_device *iphone)
 {
-       usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
-                       iphone->rx_urb->transfer_dma);
-       usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
-                       iphone->tx_urb->transfer_dma);
+       usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
+                         iphone->rx_urb->transfer_dma);
+       usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
+                         iphone->tx_urb->transfer_dma);
        usb_free_urb(iphone->rx_urb);
        usb_free_urb(iphone->tx_urb);
 }