summaryrefslogtreecommitdiff
path: root/drivers/media/pci/ngene
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-09 01:24:21 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-09 02:57:28 +0400
commit6850aeabdd1fde7cd35f26d4e8779bec943e1cd9 (patch)
tree8bf82328936e4762df92a48129bc0bc65c580d60 /drivers/media/pci/ngene
parent59e2623b433552d7402dfacd2bc2d7a22a360a4f (diff)
downloadlinux-6850aeabdd1fde7cd35f26d4e8779bec943e1cd9.tar.xz
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/pci/ngene')
-rw-r--r--drivers/media/pci/ngene/ngene-core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index 826228c3800e..4930b55fd5f4 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -1075,12 +1075,11 @@ static int AllocCommonBuffers(struct ngene *dev)
dev->ngenetohost = dev->FWInterfaceBuffer + 256;
dev->EventBuffer = dev->FWInterfaceBuffer + 512;
- dev->OverflowBuffer = pci_alloc_consistent(dev->pci_dev,
- OVERFLOW_BUFFER_SIZE,
- &dev->PAOverflowBuffer);
+ dev->OverflowBuffer = pci_zalloc_consistent(dev->pci_dev,
+ OVERFLOW_BUFFER_SIZE,
+ &dev->PAOverflowBuffer);
if (!dev->OverflowBuffer)
return -ENOMEM;
- memset(dev->OverflowBuffer, 0, OVERFLOW_BUFFER_SIZE);
for (i = STREAM_VIDEOIN1; i < MAX_STREAM; i++) {
int type = dev->card_info->io_type[i];