aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 07:17:25 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:38 -0400
commit997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch)
tree65e021973e5a48ad7290d5be1f441940566468ad /drivers/hid/usbhid/hid-core.c
parent48679c6d772b1459a2945729e3a1256ac78fcabf (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/hid/usbhid/hid-core.c')
-rw-r--r--drivers/hid/usbhid/hid-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 6a510c9675f..df619756b7a 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -783,12 +783,12 @@ static int hid_alloc_buffers(struct usb_device *dev, struct hid_device *hid)
783{ 783{
784 struct usbhid_device *usbhid = hid->driver_data; 784 struct usbhid_device *usbhid = hid->driver_data;
785 785
786 usbhid->inbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, 786 usbhid->inbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
787 &usbhid->inbuf_dma); 787 &usbhid->inbuf_dma);
788 usbhid->outbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, 788 usbhid->outbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
789 &usbhid->outbuf_dma); 789 &usbhid->outbuf_dma);
790 usbhid->cr = kmalloc(sizeof(*usbhid->cr), GFP_KERNEL); 790 usbhid->cr = kmalloc(sizeof(*usbhid->cr), GFP_KERNEL);
791 usbhid->ctrlbuf = usb_buffer_alloc(dev, usbhid->bufsize, GFP_KERNEL, 791 usbhid->ctrlbuf = usb_alloc_coherent(dev, usbhid->bufsize, GFP_KERNEL,
792 &usbhid->ctrlbuf_dma); 792 &usbhid->ctrlbuf_dma);
793 if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr || 793 if (!usbhid->inbuf || !usbhid->outbuf || !usbhid->cr ||
794 !usbhid->ctrlbuf) 794 !usbhid->ctrlbuf)
@@ -843,10 +843,10 @@ static void hid_free_buffers(struct usb_device *dev, struct hid_device *hid)
843{ 843{
844 struct usbhid_device *usbhid = hid->driver_data; 844 struct usbhid_device *usbhid = hid->driver_data;
845 845
846 usb_buffer_free(dev, usbhid->bufsize, usbhid->inbuf, usbhid->inbuf_dma); 846 usb_free_coherent(dev, usbhid->bufsize, usbhid->inbuf, usbhid->inbuf_dma);
847 usb_buffer_free(dev, usbhid->bufsize, usbhid->outbuf, usbhid->outbuf_dma); 847 usb_free_coherent(dev, usbhid->bufsize, usbhid->outbuf, usbhid->outbuf_dma);
848 kfree(usbhid->cr); 848 kfree(usbhid->cr);
849 usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma); 849 usb_free_coherent(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma);
850} 850}
851 851
852static int usbhid_parse(struct hid_device *hid) 852static int usbhid_parse(struct hid_device *hid)