summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/bt8xx/bt878.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/pci/bt8xx/bt878.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/pci/bt8xx/bt878.c')
-rw-r--r--drivers/media/pci/bt8xx/bt878.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c
index d0c281f41a0a..11765835d7b2 100644
--- a/drivers/media/pci/bt8xx/bt878.c
+++ b/drivers/media/pci/bt8xx/bt878.c
@@ -101,28 +101,20 @@ static int bt878_mem_alloc(struct bt878 *bt)
if (!bt->buf_cpu) {
bt->buf_size = 128 * 1024;
- bt->buf_cpu =
- pci_alloc_consistent(bt->dev, bt->buf_size,
- &bt->buf_dma);
-
+ bt->buf_cpu = pci_zalloc_consistent(bt->dev, bt->buf_size,
+ &bt->buf_dma);
if (!bt->buf_cpu)
return -ENOMEM;
-
- memset(bt->buf_cpu, 0, bt->buf_size);
}
if (!bt->risc_cpu) {
bt->risc_size = PAGE_SIZE;
- bt->risc_cpu =
- pci_alloc_consistent(bt->dev, bt->risc_size,
- &bt->risc_dma);
-
+ bt->risc_cpu = pci_zalloc_consistent(bt->dev, bt->risc_size,
+ &bt->risc_dma);
if (!bt->risc_cpu) {
bt878_mem_free(bt);
return -ENOMEM;
}
-
- memset(bt->risc_cpu, 0, bt->risc_size);
}
return 0;