diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-04-12 13:17:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 13:21:38 -0700 |
commit | 997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch) | |
tree | 65e021973e5a48ad7290d5be1f441940566468ad /drivers/usb/misc/ftdi-elan.c | |
parent | 48679c6d772b1459a2945729e3a1256ac78fcabf (diff) | |
download | linux-997ea58eb92f9970b8af7aae48800d0ef43b9423.tar.bz2 |
USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
All call sites have been changed accordingly, except for staging
drivers.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 2300a51d48b7..82e16630a78b 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -734,7 +734,7 @@ static void ftdi_elan_write_bulk_callback(struct urb *urb) dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %" "d\n", urb, status); } - usb_buffer_free(urb->dev, urb->transfer_buffer_length, + usb_free_coherent(urb->dev, urb->transfer_buffer_length, urb->transfer_buffer, urb->transfer_dma); } @@ -795,7 +795,7 @@ static int ftdi_elan_command_engine(struct usb_ftdi *ftdi) total_size); return -ENOMEM; } - buf = usb_buffer_alloc(ftdi->udev, total_size, GFP_KERNEL, + buf = usb_alloc_coherent(ftdi->udev, total_size, GFP_KERNEL, &urb->transfer_dma); if (!buf) { dev_err(&ftdi->udev->dev, "could not get a buffer to write %d c" @@ -829,7 +829,7 @@ static int ftdi_elan_command_engine(struct usb_ftdi *ftdi) dev_err(&ftdi->udev->dev, "failed %d to submit urb %p to write " "%d commands totaling %d bytes to the Uxxx\n", retval, urb, command_size, total_size); - usb_buffer_free(ftdi->udev, total_size, buf, urb->transfer_dma); + usb_free_coherent(ftdi->udev, total_size, buf, urb->transfer_dma); usb_free_urb(urb); return retval; } @@ -1167,7 +1167,7 @@ static ssize_t ftdi_elan_write(struct file *file, retval = -ENOMEM; goto error_1; } - buf = usb_buffer_alloc(ftdi->udev, count, GFP_KERNEL, + buf = usb_alloc_coherent(ftdi->udev, count, GFP_KERNEL, &urb->transfer_dma); if (!buf) { retval = -ENOMEM; @@ -1192,7 +1192,7 @@ static ssize_t ftdi_elan_write(struct file *file, exit: return count; error_3: - usb_buffer_free(ftdi->udev, count, buf, urb->transfer_dma); + usb_free_coherent(ftdi->udev, count, buf, urb->transfer_dma); error_2: usb_free_urb(urb); error_1: @@ -1968,7 +1968,7 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi) "ence\n"); return -ENOMEM; } - buf = usb_buffer_alloc(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); + buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); if (!buf) { dev_err(&ftdi->udev->dev, "could not get a buffer for flush seq" "uence\n"); @@ -1985,7 +1985,7 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi) if (retval) { dev_err(&ftdi->udev->dev, "failed to submit urb containing the " "flush sequence\n"); - usb_buffer_free(ftdi->udev, i, buf, urb->transfer_dma); + usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma); usb_free_urb(urb); return -ENOMEM; } @@ -2011,7 +2011,7 @@ static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi) "quence\n"); return -ENOMEM; } - buf = usb_buffer_alloc(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); + buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); if (!buf) { dev_err(&ftdi->udev->dev, "could not get a buffer for the reset" " sequence\n"); @@ -2030,7 +2030,7 @@ static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi) if (retval) { dev_err(&ftdi->udev->dev, "failed to submit urb containing the " "reset sequence\n"); - usb_buffer_free(ftdi->udev, i, buf, urb->transfer_dma); + usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma); usb_free_urb(urb); return -ENOMEM; } |