]> git.baikalelectronics.ru Git - kernel.git/commit
media: em28xx: don't use coherent buffer for DMA transfers
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 27 Feb 2018 11:08:09 +0000 (06:08 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 6 Mar 2018 09:41:34 +0000 (04:41 -0500)
commitd5ffabc272e4f39cd2bb5593395fd1f48e6ed8c7
tree1f8d58cc2b9ec49cb02639c2b5372dbfe8c33652
parent782512a0b223a2300407f9e5b9a57cd1ac1bab8d
media: em28xx: don't use coherent buffer for DMA transfers

While coherent memory is cheap on x86, it may cause performance
impacts on other archs. As we don't have any good reason to
use it, let's change the logic by allocating memory via kmalloc()
and letting the USB core to do the DMA mapping and memory free
for us.

While here, also fixes an issue that it was not de-allocating
memories if something gets wrong during memory block
allocation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/em28xx/em28xx-core.c
drivers/media/usb/em28xx/em28xx.h