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/usb/storage/usb.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/usb/storage/usb.c')
-rw-r--r-- | drivers/usb/storage/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index c54a370c76c5..e2798ef2dd19 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -414,7 +414,7 @@ static int associate_dev(struct us_data *us, struct usb_interface *intf) | |||
414 | return -ENOMEM; | 414 | return -ENOMEM; |
415 | } | 415 | } |
416 | 416 | ||
417 | us->iobuf = usb_buffer_alloc(us->pusb_dev, US_IOBUF_SIZE, | 417 | us->iobuf = usb_alloc_coherent(us->pusb_dev, US_IOBUF_SIZE, |
418 | GFP_KERNEL, &us->iobuf_dma); | 418 | GFP_KERNEL, &us->iobuf_dma); |
419 | if (!us->iobuf) { | 419 | if (!us->iobuf) { |
420 | US_DEBUGP("I/O buffer allocation failed\n"); | 420 | US_DEBUGP("I/O buffer allocation failed\n"); |
@@ -758,7 +758,7 @@ static void dissociate_dev(struct us_data *us) | |||
758 | 758 | ||
759 | /* Free the buffers */ | 759 | /* Free the buffers */ |
760 | kfree(us->cr); | 760 | kfree(us->cr); |
761 | usb_buffer_free(us->pusb_dev, US_IOBUF_SIZE, us->iobuf, us->iobuf_dma); | 761 | usb_free_coherent(us->pusb_dev, US_IOBUF_SIZE, us->iobuf, us->iobuf_dma); |
762 | 762 | ||
763 | /* Remove our private data from the interface */ | 763 | /* Remove our private data from the interface */ |
764 | usb_set_intfdata(us->pusb_intf, NULL); | 764 | usb_set_intfdata(us->pusb_intf, NULL); |