summaryrefslogtreecommitdiff
path: root/drivers/input/misc/yealink.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 15:17:25 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 00:21:38 +0400
commit997ea58eb92f9970b8af7aae48800d0ef43b9423 (patch)
tree65e021973e5a48ad7290d5be1f441940566468ad /drivers/input/misc/yealink.c
parent48679c6d772b1459a2945729e3a1256ac78fcabf (diff)
downloadlinux-997ea58eb92f9970b8af7aae48800d0ef43b9423.tar.xz
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)
usb_free_urb(yld->urb_ctl);
kfree(yld->ctl_req);
- usb_buffer_free(yld->udev, USB_PKT_LEN,
- yld->ctl_data, yld->ctl_dma);
- usb_buffer_free(yld->udev, USB_PKT_LEN,
- yld->irq_data, yld->irq_dma);
+ usb_free_coherent(yld->udev, USB_PKT_LEN, yld->ctl_data, yld->ctl_dma);
+ usb_free_coherent(yld->udev, USB_PKT_LEN, yld->irq_data, yld->irq_dma);
kfree(yld);
return err;
@@ -884,13 +882,13 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
return usb_cleanup(yld, -ENOMEM);
/* allocate usb buffers */
- yld->irq_data = usb_buffer_alloc(udev, USB_PKT_LEN,
- GFP_ATOMIC, &yld->irq_dma);
+ yld->irq_data = usb_alloc_coherent(udev, USB_PKT_LEN,
+ GFP_ATOMIC, &yld->irq_dma);
if (yld->irq_data == NULL)
return usb_cleanup(yld, -ENOMEM);
- yld->ctl_data = usb_buffer_alloc(udev, USB_PKT_LEN,
- GFP_ATOMIC, &yld->ctl_dma);
+ yld->ctl_data = usb_alloc_coherent(udev, USB_PKT_LEN,
+ GFP_ATOMIC, &yld->ctl_dma);
if (!yld->ctl_data)
return usb_cleanup(yld, -ENOMEM);