diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:28 -0400 |
commit | 6850aeabdd1fde7cd35f26d4e8779bec943e1cd9 (patch) | |
tree | 8bf82328936e4762df92a48129bc0bc65c580d60 /drivers/media/usb/ttusb-dec | |
parent | 59e2623b433552d7402dfacd2bc2d7a22a360a4f (diff) |
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-dec')
-rw-r--r-- | drivers/media/usb/ttusb-dec/ttusb_dec.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 29724af9b9ab..15ab584cf265 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c | |||
@@ -1151,11 +1151,9 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec) | |||
1151 | 1151 | ||
1152 | dprintk("%s\n", __func__); | 1152 | dprintk("%s\n", __func__); |
1153 | 1153 | ||
1154 | dec->iso_buffer = pci_alloc_consistent(NULL, | 1154 | dec->iso_buffer = pci_zalloc_consistent(NULL, |
1155 | ISO_FRAME_SIZE * | 1155 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT), |
1156 | (FRAMES_PER_ISO_BUF * | 1156 | &dec->iso_dma_handle); |
1157 | ISO_BUF_COUNT), | ||
1158 | &dec->iso_dma_handle); | ||
1159 | 1157 | ||
1160 | if (!dec->iso_buffer) { | 1158 | if (!dec->iso_buffer) { |
1161 | dprintk("%s: pci_alloc_consistent - not enough memory\n", | 1159 | dprintk("%s: pci_alloc_consistent - not enough memory\n", |
@@ -1163,9 +1161,6 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec) | |||
1163 | return -ENOMEM; | 1161 | return -ENOMEM; |
1164 | } | 1162 | } |
1165 | 1163 | ||
1166 | memset(dec->iso_buffer, 0, | ||
1167 | ISO_FRAME_SIZE * (FRAMES_PER_ISO_BUF * ISO_BUF_COUNT)); | ||
1168 | |||
1169 | for (i = 0; i < ISO_BUF_COUNT; i++) { | 1164 | for (i = 0; i < ISO_BUF_COUNT; i++) { |
1170 | struct urb *urb; | 1165 | struct urb *urb; |
1171 | 1166 | ||