aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/ftdi-elan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r--drivers/usb/misc/ftdi-elan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index 2300a51d48b7..82e16630a78b 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -734,7 +734,7 @@ static void ftdi_elan_write_bulk_callback(struct urb *urb)
734 dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %" 734 dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %"
735 "d\n", urb, status); 735 "d\n", urb, status);
736 } 736 }
737 usb_buffer_free(urb->dev, urb->transfer_buffer_length, 737 usb_free_coherent(urb->dev, urb->transfer_buffer_length,
738 urb->transfer_buffer, urb->transfer_dma); 738 urb->transfer_buffer, urb->transfer_dma);
739} 739}
740 740
@@ -795,7 +795,7 @@ static int ftdi_elan_command_engine(struct usb_ftdi *ftdi)
795 total_size); 795 total_size);
796 return -ENOMEM; 796 return -ENOMEM;
797 } 797 }
798 buf = usb_buffer_alloc(ftdi->udev, total_size, GFP_KERNEL, 798 buf = usb_alloc_coherent(ftdi->udev, total_size, GFP_KERNEL,
799 &urb->transfer_dma); 799 &urb->transfer_dma);
800 if (!buf) { 800 if (!buf) {
801 dev_err(&ftdi->udev->dev, "could not get a buffer to write %d c" 801 dev_err(&ftdi->udev->dev, "could not get a buffer to write %d c"
@@ -829,7 +829,7 @@ static int ftdi_elan_command_engine(struct usb_ftdi *ftdi)
829 dev_err(&ftdi->udev->dev, "failed %d to submit urb %p to write " 829 dev_err(&ftdi->udev->dev, "failed %d to submit urb %p to write "
830 "%d commands totaling %d bytes to the Uxxx\n", retval, 830 "%d commands totaling %d bytes to the Uxxx\n", retval,
831 urb, command_size, total_size); 831 urb, command_size, total_size);
832 usb_buffer_free(ftdi->udev, total_size, buf, urb->transfer_dma); 832 usb_free_coherent(ftdi->udev, total_size, buf, urb->transfer_dma);
833 usb_free_urb(urb); 833 usb_free_urb(urb);
834 return retval; 834 return retval;
835 } 835 }
@@ -1167,7 +1167,7 @@ static ssize_t ftdi_elan_write(struct file *file,
1167 retval = -ENOMEM; 1167 retval = -ENOMEM;
1168 goto error_1; 1168 goto error_1;
1169 } 1169 }
1170 buf = usb_buffer_alloc(ftdi->udev, count, GFP_KERNEL, 1170 buf = usb_alloc_coherent(ftdi->udev, count, GFP_KERNEL,
1171 &urb->transfer_dma); 1171 &urb->transfer_dma);
1172 if (!buf) { 1172 if (!buf) {
1173 retval = -ENOMEM; 1173 retval = -ENOMEM;
@@ -1192,7 +1192,7 @@ static ssize_t ftdi_elan_write(struct file *file,
1192exit: 1192exit:
1193 return count; 1193 return count;
1194error_3: 1194error_3:
1195 usb_buffer_free(ftdi->udev, count, buf, urb->transfer_dma); 1195 usb_free_coherent(ftdi->udev, count, buf, urb->transfer_dma);
1196error_2: 1196error_2:
1197 usb_free_urb(urb); 1197 usb_free_urb(urb);
1198error_1: 1198error_1:
@@ -1968,7 +1968,7 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi)
1968 "ence\n"); 1968 "ence\n");
1969 return -ENOMEM; 1969 return -ENOMEM;
1970 } 1970 }
1971 buf = usb_buffer_alloc(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); 1971 buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma);
1972 if (!buf) { 1972 if (!buf) {
1973 dev_err(&ftdi->udev->dev, "could not get a buffer for flush seq" 1973 dev_err(&ftdi->udev->dev, "could not get a buffer for flush seq"
1974 "uence\n"); 1974 "uence\n");
@@ -1985,7 +1985,7 @@ static int ftdi_elan_synchronize_flush(struct usb_ftdi *ftdi)
1985 if (retval) { 1985 if (retval) {
1986 dev_err(&ftdi->udev->dev, "failed to submit urb containing the " 1986 dev_err(&ftdi->udev->dev, "failed to submit urb containing the "
1987 "flush sequence\n"); 1987 "flush sequence\n");
1988 usb_buffer_free(ftdi->udev, i, buf, urb->transfer_dma); 1988 usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma);
1989 usb_free_urb(urb); 1989 usb_free_urb(urb);
1990 return -ENOMEM; 1990 return -ENOMEM;
1991 } 1991 }
@@ -2011,7 +2011,7 @@ static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi)
2011 "quence\n"); 2011 "quence\n");
2012 return -ENOMEM; 2012 return -ENOMEM;
2013 } 2013 }
2014 buf = usb_buffer_alloc(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma); 2014 buf = usb_alloc_coherent(ftdi->udev, I, GFP_KERNEL, &urb->transfer_dma);
2015 if (!buf) { 2015 if (!buf) {
2016 dev_err(&ftdi->udev->dev, "could not get a buffer for the reset" 2016 dev_err(&ftdi->udev->dev, "could not get a buffer for the reset"
2017 " sequence\n"); 2017 " sequence\n");
@@ -2030,7 +2030,7 @@ static int ftdi_elan_synchronize_reset(struct usb_ftdi *ftdi)
2030 if (retval) { 2030 if (retval) {
2031 dev_err(&ftdi->udev->dev, "failed to submit urb containing the " 2031 dev_err(&ftdi->udev->dev, "failed to submit urb containing the "
2032 "reset sequence\n"); 2032 "reset sequence\n");
2033 usb_buffer_free(ftdi->udev, i, buf, urb->transfer_dma); 2033 usb_free_coherent(ftdi->udev, i, buf, urb->transfer_dma);
2034 usb_free_urb(urb); 2034 usb_free_urb(urb);
2035 return -ENOMEM; 2035 return -ENOMEM;
2036 } 2036 }