diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
commit | 7a9b149212f3716c598afe973b6261fd58453b7a (patch) | |
tree | 477716d84c71da124448b72278e98da28aadbd3d /drivers/media | |
parent | 3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff) | |
parent | e26bcf37234c67624f62d9fc95f922b8dbda1363 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...
Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/dvb-usb/usb-urb.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/ttusb-dec/ttusb_dec.c | 6 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-video.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-core.c | 14 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/benq.c | 4 | ||||
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 30 | ||||
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-video.c | 8 | ||||
-rw-r--r-- | drivers/media/video/tlg2300/pd-main.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tlg2300/pd-video.c | 14 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-core.c | 16 | ||||
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 4 |
12 files changed, 57 insertions, 56 deletions
diff --git a/drivers/media/dvb/dvb-usb/usb-urb.c b/drivers/media/dvb/dvb-usb/usb-urb.c index f9702e3756b6..86d68933b6b4 100644 --- a/drivers/media/dvb/dvb-usb/usb-urb.c +++ b/drivers/media/dvb/dvb-usb/usb-urb.c | |||
@@ -96,8 +96,9 @@ static int usb_free_stream_buffers(struct usb_data_stream *stream) | |||
96 | while (stream->buf_num) { | 96 | while (stream->buf_num) { |
97 | stream->buf_num--; | 97 | stream->buf_num--; |
98 | deb_mem("freeing buffer %d\n",stream->buf_num); | 98 | deb_mem("freeing buffer %d\n",stream->buf_num); |
99 | usb_buffer_free(stream->udev, stream->buf_size, | 99 | usb_free_coherent(stream->udev, stream->buf_size, |
100 | stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]); | 100 | stream->buf_list[stream->buf_num], |
101 | stream->dma_addr[stream->buf_num]); | ||
101 | } | 102 | } |
102 | } | 103 | } |
103 | 104 | ||
@@ -116,7 +117,7 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num, | |||
116 | for (stream->buf_num = 0; stream->buf_num < num; stream->buf_num++) { | 117 | for (stream->buf_num = 0; stream->buf_num < num; stream->buf_num++) { |
117 | deb_mem("allocating buffer %d\n",stream->buf_num); | 118 | deb_mem("allocating buffer %d\n",stream->buf_num); |
118 | if (( stream->buf_list[stream->buf_num] = | 119 | if (( stream->buf_list[stream->buf_num] = |
119 | usb_buffer_alloc(stream->udev, size, GFP_ATOMIC, | 120 | usb_alloc_coherent(stream->udev, size, GFP_ATOMIC, |
120 | &stream->dma_addr[stream->buf_num]) ) == NULL) { | 121 | &stream->dma_addr[stream->buf_num]) ) == NULL) { |
121 | deb_mem("not enough memory for urb-buffer allocation.\n"); | 122 | deb_mem("not enough memory for urb-buffer allocation.\n"); |
122 | usb_free_stream_buffers(stream); | 123 | usb_free_stream_buffers(stream); |
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 53baccbab17f..fe1b8037b247 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -1257,7 +1257,7 @@ static int ttusb_dec_init_usb(struct ttusb_dec *dec) | |||
1257 | if(!dec->irq_urb) { | 1257 | if(!dec->irq_urb) { |
1258 | return -ENOMEM; | 1258 | return -ENOMEM; |
1259 | } | 1259 | } |
1260 | dec->irq_buffer = usb_buffer_alloc(dec->udev,IRQ_PACKET_SIZE, | 1260 | dec->irq_buffer = usb_alloc_coherent(dec->udev,IRQ_PACKET_SIZE, |
1261 | GFP_ATOMIC, &dec->irq_dma_handle); | 1261 | GFP_ATOMIC, &dec->irq_dma_handle); |
1262 | if(!dec->irq_buffer) { | 1262 | if(!dec->irq_buffer) { |
1263 | usb_free_urb(dec->irq_urb); | 1263 | usb_free_urb(dec->irq_urb); |
@@ -1550,8 +1550,8 @@ static void ttusb_dec_exit_rc(struct ttusb_dec *dec) | |||
1550 | 1550 | ||
1551 | usb_free_urb(dec->irq_urb); | 1551 | usb_free_urb(dec->irq_urb); |
1552 | 1552 | ||
1553 | usb_buffer_free(dec->udev,IRQ_PACKET_SIZE, | 1553 | usb_free_coherent(dec->udev,IRQ_PACKET_SIZE, |
1554 | dec->irq_buffer, dec->irq_dma_handle); | 1554 | dec->irq_buffer, dec->irq_dma_handle); |
1555 | 1555 | ||
1556 | if (dec->rc_input_dev) { | 1556 | if (dec->rc_input_dev) { |
1557 | input_unregister_device(dec->rc_input_dev); | 1557 | input_unregister_device(dec->rc_input_dev); |
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index 66150216f976..52f25aabb6dc 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -177,7 +177,7 @@ void au0828_uninit_isoc(struct au0828_dev *dev) | |||
177 | usb_unlink_urb(urb); | 177 | usb_unlink_urb(urb); |
178 | 178 | ||
179 | if (dev->isoc_ctl.transfer_buffer[i]) { | 179 | if (dev->isoc_ctl.transfer_buffer[i]) { |
180 | usb_buffer_free(dev->usbdev, | 180 | usb_free_coherent(dev->usbdev, |
181 | urb->transfer_buffer_length, | 181 | urb->transfer_buffer_length, |
182 | dev->isoc_ctl.transfer_buffer[i], | 182 | dev->isoc_ctl.transfer_buffer[i], |
183 | urb->transfer_dma); | 183 | urb->transfer_dma); |
@@ -247,7 +247,7 @@ int au0828_init_isoc(struct au0828_dev *dev, int max_packets, | |||
247 | } | 247 | } |
248 | dev->isoc_ctl.urb[i] = urb; | 248 | dev->isoc_ctl.urb[i] = urb; |
249 | 249 | ||
250 | dev->isoc_ctl.transfer_buffer[i] = usb_buffer_alloc(dev->usbdev, | 250 | dev->isoc_ctl.transfer_buffer[i] = usb_alloc_coherent(dev->usbdev, |
251 | sb_size, GFP_KERNEL, &urb->transfer_dma); | 251 | sb_size, GFP_KERNEL, &urb->transfer_dma); |
252 | if (!dev->isoc_ctl.transfer_buffer[i]) { | 252 | if (!dev->isoc_ctl.transfer_buffer[i]) { |
253 | printk("unable to allocate %i bytes for transfer" | 253 | printk("unable to allocate %i bytes for transfer" |
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c index f5e1a2315fcc..912a4d740206 100644 --- a/drivers/media/video/cx231xx/cx231xx-core.c +++ b/drivers/media/video/cx231xx/cx231xx-core.c | |||
@@ -676,11 +676,11 @@ void cx231xx_uninit_isoc(struct cx231xx *dev) | |||
676 | usb_unlink_urb(urb); | 676 | usb_unlink_urb(urb); |
677 | 677 | ||
678 | if (dev->video_mode.isoc_ctl.transfer_buffer[i]) { | 678 | if (dev->video_mode.isoc_ctl.transfer_buffer[i]) { |
679 | usb_buffer_free(dev->udev, | 679 | usb_free_coherent(dev->udev, |
680 | urb->transfer_buffer_length, | 680 | urb->transfer_buffer_length, |
681 | dev->video_mode.isoc_ctl. | 681 | dev->video_mode.isoc_ctl. |
682 | transfer_buffer[i], | 682 | transfer_buffer[i], |
683 | urb->transfer_dma); | 683 | urb->transfer_dma); |
684 | } | 684 | } |
685 | usb_free_urb(urb); | 685 | usb_free_urb(urb); |
686 | dev->video_mode.isoc_ctl.urb[i] = NULL; | 686 | dev->video_mode.isoc_ctl.urb[i] = NULL; |
@@ -767,8 +767,8 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets, | |||
767 | dev->video_mode.isoc_ctl.urb[i] = urb; | 767 | dev->video_mode.isoc_ctl.urb[i] = urb; |
768 | 768 | ||
769 | dev->video_mode.isoc_ctl.transfer_buffer[i] = | 769 | dev->video_mode.isoc_ctl.transfer_buffer[i] = |
770 | usb_buffer_alloc(dev->udev, sb_size, GFP_KERNEL, | 770 | usb_alloc_coherent(dev->udev, sb_size, GFP_KERNEL, |
771 | &urb->transfer_dma); | 771 | &urb->transfer_dma); |
772 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { | 772 | if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { |
773 | cx231xx_err("unable to allocate %i bytes for transfer" | 773 | cx231xx_err("unable to allocate %i bytes for transfer" |
774 | " buffer %i%s\n", | 774 | " buffer %i%s\n", |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index d3813ed789d9..331e1cac4272 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -970,7 +970,7 @@ void em28xx_uninit_isoc(struct em28xx *dev) | |||
970 | usb_unlink_urb(urb); | 970 | usb_unlink_urb(urb); |
971 | 971 | ||
972 | if (dev->isoc_ctl.transfer_buffer[i]) { | 972 | if (dev->isoc_ctl.transfer_buffer[i]) { |
973 | usb_buffer_free(dev->udev, | 973 | usb_free_coherent(dev->udev, |
974 | urb->transfer_buffer_length, | 974 | urb->transfer_buffer_length, |
975 | dev->isoc_ctl.transfer_buffer[i], | 975 | dev->isoc_ctl.transfer_buffer[i], |
976 | urb->transfer_dma); | 976 | urb->transfer_dma); |
@@ -1045,7 +1045,7 @@ int em28xx_init_isoc(struct em28xx *dev, int max_packets, | |||
1045 | } | 1045 | } |
1046 | dev->isoc_ctl.urb[i] = urb; | 1046 | dev->isoc_ctl.urb[i] = urb; |
1047 | 1047 | ||
1048 | dev->isoc_ctl.transfer_buffer[i] = usb_buffer_alloc(dev->udev, | 1048 | dev->isoc_ctl.transfer_buffer[i] = usb_alloc_coherent(dev->udev, |
1049 | sb_size, GFP_KERNEL, &urb->transfer_dma); | 1049 | sb_size, GFP_KERNEL, &urb->transfer_dma); |
1050 | if (!dev->isoc_ctl.transfer_buffer[i]) { | 1050 | if (!dev->isoc_ctl.transfer_buffer[i]) { |
1051 | em28xx_err("unable to allocate %i bytes for transfer" | 1051 | em28xx_err("unable to allocate %i bytes for transfer" |
diff --git a/drivers/media/video/gspca/benq.c b/drivers/media/video/gspca/benq.c index 43ac4af8d3ed..fce8d9492641 100644 --- a/drivers/media/video/gspca/benq.c +++ b/drivers/media/video/gspca/benq.c | |||
@@ -117,13 +117,13 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
117 | return -ENOMEM; | 117 | return -ENOMEM; |
118 | } | 118 | } |
119 | gspca_dev->urb[n] = urb; | 119 | gspca_dev->urb[n] = urb; |
120 | urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev, | 120 | urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, |
121 | SD_PKT_SZ * SD_NPKT, | 121 | SD_PKT_SZ * SD_NPKT, |
122 | GFP_KERNEL, | 122 | GFP_KERNEL, |
123 | &urb->transfer_dma); | 123 | &urb->transfer_dma); |
124 | 124 | ||
125 | if (urb->transfer_buffer == NULL) { | 125 | if (urb->transfer_buffer == NULL) { |
126 | err("usb_buffer_alloc failed"); | 126 | err("usb_alloc_coherent failed"); |
127 | return -ENOMEM; | 127 | return -ENOMEM; |
128 | } | 128 | } |
129 | urb->dev = gspca_dev->dev; | 129 | urb->dev = gspca_dev->dev; |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index efe615938783..678675bb3652 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -213,7 +213,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, | |||
213 | goto error; | 213 | goto error; |
214 | } | 214 | } |
215 | 215 | ||
216 | buffer = usb_buffer_alloc(dev, buffer_len, | 216 | buffer = usb_alloc_coherent(dev, buffer_len, |
217 | GFP_KERNEL, &urb->transfer_dma); | 217 | GFP_KERNEL, &urb->transfer_dma); |
218 | if (!buffer) { | 218 | if (!buffer) { |
219 | ret = -ENOMEM; | 219 | ret = -ENOMEM; |
@@ -232,10 +232,10 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, | |||
232 | return ret; | 232 | return ret; |
233 | 233 | ||
234 | error_submit: | 234 | error_submit: |
235 | usb_buffer_free(dev, | 235 | usb_free_coherent(dev, |
236 | urb->transfer_buffer_length, | 236 | urb->transfer_buffer_length, |
237 | urb->transfer_buffer, | 237 | urb->transfer_buffer, |
238 | urb->transfer_dma); | 238 | urb->transfer_dma); |
239 | error_buffer: | 239 | error_buffer: |
240 | usb_free_urb(urb); | 240 | usb_free_urb(urb); |
241 | error: | 241 | error: |
@@ -272,10 +272,10 @@ static void gspca_input_destroy_urb(struct gspca_dev *gspca_dev) | |||
272 | if (urb) { | 272 | if (urb) { |
273 | gspca_dev->int_urb = NULL; | 273 | gspca_dev->int_urb = NULL; |
274 | usb_kill_urb(urb); | 274 | usb_kill_urb(urb); |
275 | usb_buffer_free(gspca_dev->dev, | 275 | usb_free_coherent(gspca_dev->dev, |
276 | urb->transfer_buffer_length, | 276 | urb->transfer_buffer_length, |
277 | urb->transfer_buffer, | 277 | urb->transfer_buffer, |
278 | urb->transfer_dma); | 278 | urb->transfer_dma); |
279 | usb_free_urb(urb); | 279 | usb_free_urb(urb); |
280 | } | 280 | } |
281 | } | 281 | } |
@@ -605,10 +605,10 @@ static void destroy_urbs(struct gspca_dev *gspca_dev) | |||
605 | gspca_dev->urb[i] = NULL; | 605 | gspca_dev->urb[i] = NULL; |
606 | usb_kill_urb(urb); | 606 | usb_kill_urb(urb); |
607 | if (urb->transfer_buffer != NULL) | 607 | if (urb->transfer_buffer != NULL) |
608 | usb_buffer_free(gspca_dev->dev, | 608 | usb_free_coherent(gspca_dev->dev, |
609 | urb->transfer_buffer_length, | 609 | urb->transfer_buffer_length, |
610 | urb->transfer_buffer, | 610 | urb->transfer_buffer, |
611 | urb->transfer_dma); | 611 | urb->transfer_dma); |
612 | usb_free_urb(urb); | 612 | usb_free_urb(urb); |
613 | } | 613 | } |
614 | } | 614 | } |
@@ -760,13 +760,13 @@ static int create_urbs(struct gspca_dev *gspca_dev, | |||
760 | return -ENOMEM; | 760 | return -ENOMEM; |
761 | } | 761 | } |
762 | gspca_dev->urb[n] = urb; | 762 | gspca_dev->urb[n] = urb; |
763 | urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev, | 763 | urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, |
764 | bsize, | 764 | bsize, |
765 | GFP_KERNEL, | 765 | GFP_KERNEL, |
766 | &urb->transfer_dma); | 766 | &urb->transfer_dma); |
767 | 767 | ||
768 | if (urb->transfer_buffer == NULL) { | 768 | if (urb->transfer_buffer == NULL) { |
769 | err("usb_buffer_alloc failed"); | 769 | err("usb_alloc_coherent failed"); |
770 | return -ENOMEM; | 770 | return -ENOMEM; |
771 | } | 771 | } |
772 | urb->dev = gspca_dev->dev; | 772 | urb->dev = gspca_dev->dev; |
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c index d2f0ee29737f..7cfccfd1b870 100644 --- a/drivers/media/video/hdpvr/hdpvr-video.c +++ b/drivers/media/video/hdpvr/hdpvr-video.c | |||
@@ -92,8 +92,8 @@ static int hdpvr_free_queue(struct list_head *q) | |||
92 | buf = list_entry(p, struct hdpvr_buffer, buff_list); | 92 | buf = list_entry(p, struct hdpvr_buffer, buff_list); |
93 | 93 | ||
94 | urb = buf->urb; | 94 | urb = buf->urb; |
95 | usb_buffer_free(urb->dev, urb->transfer_buffer_length, | 95 | usb_free_coherent(urb->dev, urb->transfer_buffer_length, |
96 | urb->transfer_buffer, urb->transfer_dma); | 96 | urb->transfer_buffer, urb->transfer_dma); |
97 | usb_free_urb(urb); | 97 | usb_free_urb(urb); |
98 | tmp = p->next; | 98 | tmp = p->next; |
99 | list_del(p); | 99 | list_del(p); |
@@ -143,8 +143,8 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) | |||
143 | } | 143 | } |
144 | buf->urb = urb; | 144 | buf->urb = urb; |
145 | 145 | ||
146 | mem = usb_buffer_alloc(dev->udev, dev->bulk_in_size, GFP_KERNEL, | 146 | mem = usb_alloc_coherent(dev->udev, dev->bulk_in_size, GFP_KERNEL, |
147 | &urb->transfer_dma); | 147 | &urb->transfer_dma); |
148 | if (!mem) { | 148 | if (!mem) { |
149 | v4l2_err(&dev->v4l2_dev, | 149 | v4l2_err(&dev->v4l2_dev, |
150 | "cannot allocate usb transfer buffer\n"); | 150 | "cannot allocate usb transfer buffer\n"); |
diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c index c267e0cfb54b..256cc558ba13 100644 --- a/drivers/media/video/tlg2300/pd-main.c +++ b/drivers/media/video/tlg2300/pd-main.c | |||
@@ -454,8 +454,8 @@ static int poseidon_probe(struct usb_interface *interface, | |||
454 | 454 | ||
455 | device_init_wakeup(&udev->dev, 1); | 455 | device_init_wakeup(&udev->dev, 1); |
456 | #ifdef CONFIG_PM | 456 | #ifdef CONFIG_PM |
457 | pd->udev->autosuspend_disabled = 0; | ||
458 | pd->udev->autosuspend_delay = HZ * PM_SUSPEND_DELAY; | 457 | pd->udev->autosuspend_delay = HZ * PM_SUSPEND_DELAY; |
458 | usb_enable_autosuspend(pd->udev); | ||
459 | 459 | ||
460 | if (in_hibernation(pd)) { | 460 | if (in_hibernation(pd)) { |
461 | INIT_WORK(&pd->pm_work, hibernation_resume); | 461 | INIT_WORK(&pd->pm_work, hibernation_resume); |
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c index c750fd115ec4..d0cc012f7ae6 100644 --- a/drivers/media/video/tlg2300/pd-video.c +++ b/drivers/media/video/tlg2300/pd-video.c | |||
@@ -478,10 +478,10 @@ static int prepare_iso_urb(struct video_data *video) | |||
478 | goto out; | 478 | goto out; |
479 | 479 | ||
480 | video->urb_array[i] = urb; | 480 | video->urb_array[i] = urb; |
481 | mem = usb_buffer_alloc(udev, | 481 | mem = usb_alloc_coherent(udev, |
482 | ISO_PKT_SIZE * PK_PER_URB, | 482 | ISO_PKT_SIZE * PK_PER_URB, |
483 | GFP_KERNEL, | 483 | GFP_KERNEL, |
484 | &urb->transfer_dma); | 484 | &urb->transfer_dma); |
485 | 485 | ||
486 | urb->complete = urb_complete_iso; /* handler */ | 486 | urb->complete = urb_complete_iso; /* handler */ |
487 | urb->dev = udev; | 487 | urb->dev = udev; |
@@ -521,8 +521,8 @@ int alloc_bulk_urbs_generic(struct urb **urb_array, int num, | |||
521 | if (urb == NULL) | 521 | if (urb == NULL) |
522 | return i; | 522 | return i; |
523 | 523 | ||
524 | mem = usb_buffer_alloc(udev, buf_size, gfp_flags, | 524 | mem = usb_alloc_coherent(udev, buf_size, gfp_flags, |
525 | &urb->transfer_dma); | 525 | &urb->transfer_dma); |
526 | if (mem == NULL) | 526 | if (mem == NULL) |
527 | return i; | 527 | return i; |
528 | 528 | ||
@@ -542,7 +542,7 @@ void free_all_urb_generic(struct urb **urb_array, int num) | |||
542 | for (i = 0; i < num; i++) { | 542 | for (i = 0; i < num; i++) { |
543 | urb = urb_array[i]; | 543 | urb = urb_array[i]; |
544 | if (urb) { | 544 | if (urb) { |
545 | usb_buffer_free(urb->dev, | 545 | usb_free_coherent(urb->dev, |
546 | urb->transfer_buffer_length, | 546 | urb->transfer_buffer_length, |
547 | urb->transfer_buffer, | 547 | urb->transfer_buffer, |
548 | urb->transfer_dma); | 548 | urb->transfer_dma); |
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index f7aae2293758..b9dd74fde212 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -2493,10 +2493,10 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) | |||
2493 | } | 2493 | } |
2494 | usbvision->sbuf[bufIdx].urb = urb; | 2494 | usbvision->sbuf[bufIdx].urb = urb; |
2495 | usbvision->sbuf[bufIdx].data = | 2495 | usbvision->sbuf[bufIdx].data = |
2496 | usb_buffer_alloc(usbvision->dev, | 2496 | usb_alloc_coherent(usbvision->dev, |
2497 | sb_size, | 2497 | sb_size, |
2498 | GFP_KERNEL, | 2498 | GFP_KERNEL, |
2499 | &urb->transfer_dma); | 2499 | &urb->transfer_dma); |
2500 | urb->dev = dev; | 2500 | urb->dev = dev; |
2501 | urb->context = usbvision; | 2501 | urb->context = usbvision; |
2502 | urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); | 2502 | urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); |
@@ -2552,10 +2552,10 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) | |||
2552 | for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { | 2552 | for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { |
2553 | usb_kill_urb(usbvision->sbuf[bufIdx].urb); | 2553 | usb_kill_urb(usbvision->sbuf[bufIdx].urb); |
2554 | if (usbvision->sbuf[bufIdx].data){ | 2554 | if (usbvision->sbuf[bufIdx].data){ |
2555 | usb_buffer_free(usbvision->dev, | 2555 | usb_free_coherent(usbvision->dev, |
2556 | sb_size, | 2556 | sb_size, |
2557 | usbvision->sbuf[bufIdx].data, | 2557 | usbvision->sbuf[bufIdx].data, |
2558 | usbvision->sbuf[bufIdx].urb->transfer_dma); | 2558 | usbvision->sbuf[bufIdx].urb->transfer_dma); |
2559 | } | 2559 | } |
2560 | usb_free_urb(usbvision->sbuf[bufIdx].urb); | 2560 | usb_free_urb(usbvision->sbuf[bufIdx].urb); |
2561 | usbvision->sbuf[bufIdx].urb = NULL; | 2561 | usbvision->sbuf[bufIdx].urb = NULL; |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 821a9969b7bf..53f3ef4635eb 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -739,7 +739,7 @@ static void uvc_free_urb_buffers(struct uvc_streaming *stream) | |||
739 | 739 | ||
740 | for (i = 0; i < UVC_URBS; ++i) { | 740 | for (i = 0; i < UVC_URBS; ++i) { |
741 | if (stream->urb_buffer[i]) { | 741 | if (stream->urb_buffer[i]) { |
742 | usb_buffer_free(stream->dev->udev, stream->urb_size, | 742 | usb_free_coherent(stream->dev->udev, stream->urb_size, |
743 | stream->urb_buffer[i], stream->urb_dma[i]); | 743 | stream->urb_buffer[i], stream->urb_dma[i]); |
744 | stream->urb_buffer[i] = NULL; | 744 | stream->urb_buffer[i] = NULL; |
745 | } | 745 | } |
@@ -780,7 +780,7 @@ static int uvc_alloc_urb_buffers(struct uvc_streaming *stream, | |||
780 | for (; npackets > 1; npackets /= 2) { | 780 | for (; npackets > 1; npackets /= 2) { |
781 | for (i = 0; i < UVC_URBS; ++i) { | 781 | for (i = 0; i < UVC_URBS; ++i) { |
782 | stream->urb_size = psize * npackets; | 782 | stream->urb_size = psize * npackets; |
783 | stream->urb_buffer[i] = usb_buffer_alloc( | 783 | stream->urb_buffer[i] = usb_alloc_coherent( |
784 | stream->dev->udev, stream->urb_size, | 784 | stream->dev->udev, stream->urb_size, |
785 | gfp_flags | __GFP_NOWARN, &stream->urb_dma[i]); | 785 | gfp_flags | __GFP_NOWARN, &stream->urb_dma[i]); |
786 | if (!stream->urb_buffer[i]) { | 786 | if (!stream->urb_buffer[i]) { |