aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/yealink.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/input/misc/yealink.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/input/misc/yealink.c')
-rw-r--r--drivers/input/misc/yealink.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c
index 2828328e9dd0..41201c6b5e68 100644
--- a/drivers/input/misc/yealink.c
+++ b/drivers/input/misc/yealink.c
@@ -836,10 +836,8 @@ static int usb_cleanup(struct yealink_dev *yld, int err)
836 usb_free_urb(yld->urb_ctl); 836 usb_free_urb(yld->urb_ctl);
837 837
838 kfree(yld->ctl_req); 838 kfree(yld->ctl_req);
839 usb_buffer_free(yld->udev, USB_PKT_LEN, 839 usb_free_coherent(yld->udev, USB_PKT_LEN, yld->ctl_data, yld->ctl_dma);
840 yld->ctl_data, yld->ctl_dma); 840 usb_free_coherent(yld->udev, USB_PKT_LEN, yld->irq_data, yld->irq_dma);
841 usb_buffer_free(yld->udev, USB_PKT_LEN,
842 yld->irq_data, yld->irq_dma);
843 841
844 kfree(yld); 842 kfree(yld);
845 return err; 843 return err;
@@ -884,13 +882,13 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
884 return usb_cleanup(yld, -ENOMEM); 882 return usb_cleanup(yld, -ENOMEM);
885 883
886 /* allocate usb buffers */ 884 /* allocate usb buffers */
887 yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN, 885 yld->irq_data = usb_alloc_coherent(udev, USB_PKT_LEN,
888 GFP_ATOMIC, &yld->irq_dma); 886 GFP_ATOMIC, &yld->irq_dma);
889 if (yld->irq_data == NULL) 887 if (yld->irq_data == NULL)
890 return usb_cleanup(yld, -ENOMEM); 888 return usb_cleanup(yld, -ENOMEM);
891 889
892 yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN, 890 yld->ctl_data = usb_alloc_coherent(udev, USB_PKT_LEN,
893 GFP_ATOMIC, &yld->ctl_dma); 891 GFP_ATOMIC, &yld->ctl_dma);
894 if (!yld->ctl_data) 892 if (!yld->ctl_data)
895 return usb_cleanup(yld, -ENOMEM); 893 return usb_cleanup(yld, -ENOMEM);
896 894