diff options
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 5e1a253b08a0..0c2f14ff9696 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -892,7 +892,7 @@ static void acm_write_buffers_free(struct acm *acm) | |||
892 | struct usb_device *usb_dev = interface_to_usbdev(acm->control); | 892 | struct usb_device *usb_dev = interface_to_usbdev(acm->control); |
893 | 893 | ||
894 | for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) | 894 | for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) |
895 | usb_buffer_free(usb_dev, acm->writesize, wb->buf, wb->dmah); | 895 | usb_free_coherent(usb_dev, acm->writesize, wb->buf, wb->dmah); |
896 | } | 896 | } |
897 | 897 | ||
898 | static void acm_read_buffers_free(struct acm *acm) | 898 | static void acm_read_buffers_free(struct acm *acm) |
@@ -901,8 +901,8 @@ static void acm_read_buffers_free(struct acm *acm) | |||
901 | int i, n = acm->rx_buflimit; | 901 | int i, n = acm->rx_buflimit; |
902 | 902 | ||
903 | for (i = 0; i < n; i++) | 903 | for (i = 0; i < n; i++) |
904 | usb_buffer_free(usb_dev, acm->readsize, | 904 | usb_free_coherent(usb_dev, acm->readsize, |
905 | acm->rb[i].base, acm->rb[i].dma); | 905 | acm->rb[i].base, acm->rb[i].dma); |
906 | } | 906 | } |
907 | 907 | ||
908 | /* Little helper: write buffers allocate */ | 908 | /* Little helper: write buffers allocate */ |
@@ -912,13 +912,13 @@ static int acm_write_buffers_alloc(struct acm *acm) | |||
912 | struct acm_wb *wb; | 912 | struct acm_wb *wb; |
913 | 913 | ||
914 | for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) { | 914 | for (wb = &acm->wb[0], i = 0; i < ACM_NW; i++, wb++) { |
915 | wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL, | 915 | wb->buf = usb_alloc_coherent(acm->dev, acm->writesize, GFP_KERNEL, |
916 | &wb->dmah); | 916 | &wb->dmah); |
917 | if (!wb->buf) { | 917 | if (!wb->buf) { |
918 | while (i != 0) { | 918 | while (i != 0) { |
919 | --i; | 919 | --i; |
920 | --wb; | 920 | --wb; |
921 | usb_buffer_free(acm->dev, acm->writesize, | 921 | usb_free_coherent(acm->dev, acm->writesize, |
922 | wb->buf, wb->dmah); | 922 | wb->buf, wb->dmah); |
923 | } | 923 | } |
924 | return -ENOMEM; | 924 | return -ENOMEM; |
@@ -1177,7 +1177,7 @@ made_compressed_probe: | |||
1177 | tty_port_init(&acm->port); | 1177 | tty_port_init(&acm->port); |
1178 | acm->port.ops = &acm_port_ops; | 1178 | acm->port.ops = &acm_port_ops; |
1179 | 1179 | ||
1180 | buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); | 1180 | buf = usb_alloc_coherent(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); |
1181 | if (!buf) { | 1181 | if (!buf) { |
1182 | dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n"); | 1182 | dev_dbg(&intf->dev, "out of memory (ctrl buffer alloc)\n"); |
1183 | goto alloc_fail2; | 1183 | goto alloc_fail2; |
@@ -1210,11 +1210,11 @@ made_compressed_probe: | |||
1210 | for (i = 0; i < num_rx_buf; i++) { | 1210 | for (i = 0; i < num_rx_buf; i++) { |
1211 | struct acm_rb *rb = &(acm->rb[i]); | 1211 | struct acm_rb *rb = &(acm->rb[i]); |
1212 | 1212 | ||
1213 | rb->base = usb_buffer_alloc(acm->dev, readsize, | 1213 | rb->base = usb_alloc_coherent(acm->dev, readsize, |
1214 | GFP_KERNEL, &rb->dma); | 1214 | GFP_KERNEL, &rb->dma); |
1215 | if (!rb->base) { | 1215 | if (!rb->base) { |
1216 | dev_dbg(&intf->dev, | 1216 | dev_dbg(&intf->dev, |
1217 | "out of memory (read bufs usb_buffer_alloc)\n"); | 1217 | "out of memory (read bufs usb_alloc_coherent)\n"); |
1218 | goto alloc_fail7; | 1218 | goto alloc_fail7; |
1219 | } | 1219 | } |
1220 | } | 1220 | } |
@@ -1306,7 +1306,7 @@ alloc_fail7: | |||
1306 | alloc_fail5: | 1306 | alloc_fail5: |
1307 | acm_write_buffers_free(acm); | 1307 | acm_write_buffers_free(acm); |
1308 | alloc_fail4: | 1308 | alloc_fail4: |
1309 | usb_buffer_free(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); | 1309 | usb_free_coherent(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); |
1310 | alloc_fail2: | 1310 | alloc_fail2: |
1311 | kfree(acm); | 1311 | kfree(acm); |
1312 | alloc_fail: | 1312 | alloc_fail: |
@@ -1356,8 +1356,8 @@ static void acm_disconnect(struct usb_interface *intf) | |||
1356 | stop_data_traffic(acm); | 1356 | stop_data_traffic(acm); |
1357 | 1357 | ||
1358 | acm_write_buffers_free(acm); | 1358 | acm_write_buffers_free(acm); |
1359 | usb_buffer_free(usb_dev, acm->ctrlsize, acm->ctrl_buffer, | 1359 | usb_free_coherent(usb_dev, acm->ctrlsize, acm->ctrl_buffer, |
1360 | acm->ctrl_dma); | 1360 | acm->ctrl_dma); |
1361 | acm_read_buffers_free(acm); | 1361 | acm_read_buffers_free(acm); |
1362 | 1362 | ||
1363 | if (!acm->combined_interfaces) | 1363 | if (!acm->combined_interfaces) |