summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 23:24:21 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-09 00:57:28 +0200
commit6850aeabdd1fde7cd35f26d4e8779bec943e1cd9 (patch)
tree8bf82328936e4762df92a48129bc0bc65c580d60 /drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
parenti810: use pci_zalloc_consistent (diff)
downloadlinux-6850aeabdd1fde7cd35f26d4e8779bec943e1cd9.tar.xz
linux-6850aeabdd1fde7cd35f26d4e8779bec943e1cd9.zip
media: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c')
-rw-r--r--drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index f166ffc9800a..cef7a00099ea 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -803,11 +803,9 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
{
int i;
- ttusb->iso_buffer = pci_alloc_consistent(NULL,
- ISO_FRAME_SIZE *
- FRAMES_PER_ISO_BUF *
- ISO_BUF_COUNT,
- &ttusb->iso_dma_handle);
+ ttusb->iso_buffer = pci_zalloc_consistent(NULL,
+ ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT,
+ &ttusb->iso_dma_handle);
if (!ttusb->iso_buffer) {
dprintk("%s: pci_alloc_consistent - not enough memory\n",
@@ -815,9 +813,6 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
return -ENOMEM;
}
- memset(ttusb->iso_buffer, 0,
- ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF * ISO_BUF_COUNT);
-
for (i = 0; i < ISO_BUF_COUNT; i++) {
struct urb *urb;