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/hid/usbhid/usbmouse.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/hid/usbhid/usbmouse.c')
-rw-r--r-- | drivers/hid/usbhid/usbmouse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c index 72ab4b268096..79b2bf81a059 100644 --- a/drivers/hid/usbhid/usbmouse.c +++ b/drivers/hid/usbhid/usbmouse.c | |||
@@ -142,7 +142,7 @@ static int usb_mouse_probe(struct usb_interface *intf, const struct usb_device_i | |||
142 | if (!mouse || !input_dev) | 142 | if (!mouse || !input_dev) |
143 | goto fail1; | 143 | goto fail1; |
144 | 144 | ||
145 | mouse->data = usb_buffer_alloc(dev, 8, GFP_ATOMIC, &mouse->data_dma); | 145 | mouse->data = usb_alloc_coherent(dev, 8, GFP_ATOMIC, &mouse->data_dma); |
146 | if (!mouse->data) | 146 | if (!mouse->data) |
147 | goto fail1; | 147 | goto fail1; |
148 | 148 | ||
@@ -205,7 +205,7 @@ static int usb_mouse_probe(struct usb_interface *intf, const struct usb_device_i | |||
205 | fail3: | 205 | fail3: |
206 | usb_free_urb(mouse->irq); | 206 | usb_free_urb(mouse->irq); |
207 | fail2: | 207 | fail2: |
208 | usb_buffer_free(dev, 8, mouse->data, mouse->data_dma); | 208 | usb_free_coherent(dev, 8, mouse->data, mouse->data_dma); |
209 | fail1: | 209 | fail1: |
210 | input_free_device(input_dev); | 210 | input_free_device(input_dev); |
211 | kfree(mouse); | 211 | kfree(mouse); |
@@ -221,7 +221,7 @@ static void usb_mouse_disconnect(struct usb_interface *intf) | |||
221 | usb_kill_urb(mouse->irq); | 221 | usb_kill_urb(mouse->irq); |
222 | input_unregister_device(mouse->dev); | 222 | input_unregister_device(mouse->dev); |
223 | usb_free_urb(mouse->irq); | 223 | usb_free_urb(mouse->irq); |
224 | usb_buffer_free(interface_to_usbdev(intf), 8, mouse->data, mouse->data_dma); | 224 | usb_free_coherent(interface_to_usbdev(intf), 8, mouse->data, mouse->data_dma); |
225 | kfree(mouse); | 225 | kfree(mouse); |
226 | } | 226 | } |
227 | } | 227 | } |