diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-04-12 07:17:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:38 -0400 |
commit | 997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch) | |
tree | 65e021973e5a48ad7290d5be1f441940566468ad /drivers/input/mouse/appletouch.c | |
parent | 48679c6d772b1459a2945729e3a1256ac78fcabf (diff) |
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/input/mouse/appletouch.c')
-rw-r--r-- | drivers/input/mouse/appletouch.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 53ec7ddd1826..05edd75abca0 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c | |||
@@ -806,8 +806,8 @@ static int atp_probe(struct usb_interface *iface, | |||
806 | if (!dev->urb) | 806 | if (!dev->urb) |
807 | goto err_free_devs; | 807 | goto err_free_devs; |
808 | 808 | ||
809 | dev->data = usb_buffer_alloc(dev->udev, dev->info->datalen, GFP_KERNEL, | 809 | dev->data = usb_alloc_coherent(dev->udev, dev->info->datalen, GFP_KERNEL, |
810 | &dev->urb->transfer_dma); | 810 | &dev->urb->transfer_dma); |
811 | if (!dev->data) | 811 | if (!dev->data) |
812 | goto err_free_urb; | 812 | goto err_free_urb; |
813 | 813 | ||
@@ -862,8 +862,8 @@ static int atp_probe(struct usb_interface *iface, | |||
862 | return 0; | 862 | return 0; |
863 | 863 | ||
864 | err_free_buffer: | 864 | err_free_buffer: |
865 | usb_buffer_free(dev->udev, dev->info->datalen, | 865 | usb_free_coherent(dev->udev, dev->info->datalen, |
866 | dev->data, dev->urb->transfer_dma); | 866 | dev->data, dev->urb->transfer_dma); |
867 | err_free_urb: | 867 | err_free_urb: |
868 | usb_free_urb(dev->urb); | 868 | usb_free_urb(dev->urb); |
869 | err_free_devs: | 869 | err_free_devs: |
@@ -881,8 +881,8 @@ static void atp_disconnect(struct usb_interface *iface) | |||
881 | if (dev) { | 881 | if (dev) { |
882 | usb_kill_urb(dev->urb); | 882 | usb_kill_urb(dev->urb); |
883 | input_unregister_device(dev->input); | 883 | input_unregister_device(dev->input); |
884 | usb_buffer_free(dev->udev, dev->info->datalen, | 884 | usb_free_coherent(dev->udev, dev->info->datalen, |
885 | dev->data, dev->urb->transfer_dma); | 885 | dev->data, dev->urb->transfer_dma); |
886 | usb_free_urb(dev->urb); | 886 | usb_free_urb(dev->urb); |
887 | kfree(dev); | 887 | kfree(dev); |
888 | } | 888 | } |