aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
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)