]> git.baikalelectronics.ru Git - kernel.git/commit
[media] cxusb: Use a dma capable buffer also for reading
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 5 Feb 2017 14:57:59 +0000 (12:57 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 8 Feb 2017 13:52:40 +0000 (11:52 -0200)
commita09f4c30fe09050dec9aade69bc0467270107bee
tree56edab612463b64d0cb0428820c1074e6e0ce3d8
parent91b6b7b1557f3ffb4db8f8695fbcfacdc0918ab0
[media] cxusb: Use a dma capable buffer also for reading

Commit 1c1f7e853929 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.

As dvb_usb_generic_rw handles a read length of 0 by itself, avoid calling
it using the dvb_usb_generic_read wrapper function.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/dvb-usb/cxusb.c