summaryrefslogtreecommitdiffstats
path: root/drivers/tty/synclink_gt.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 14:24:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 15:57:30 -0700
commitd54d7796c5f86eea0748a185b56ffb74ebc050e6 (patch)
tree748d5388db34ae2de9f62ac7ba6488c88e12d998 /drivers/tty/synclink_gt.c
parent8b983be54bb5c4ff133e3aa45fe50669089d0a68 (diff)
downloadlinux-d54d7796c5f86eea0748a185b56ffb74ebc050e6.tar.bz2
synclink_gt: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/tty/synclink_gt.c')
-rw-r--r--drivers/tty/synclink_gt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index ba1dbcdf4609..0e8c39b6ccd4 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -3383,12 +3383,11 @@ static int alloc_desc(struct slgt_info *info)
unsigned int pbufs;
/* allocate memory to hold descriptor lists */
- info->bufs = pci_alloc_consistent(info->pdev, DESC_LIST_SIZE, &info->bufs_dma_addr);
+ info->bufs = pci_zalloc_consistent(info->pdev, DESC_LIST_SIZE,
+ &info->bufs_dma_addr);
if (info->bufs == NULL)
return -ENOMEM;
- memset(info->bufs, 0, DESC_LIST_SIZE);
-
info->rbufs = (struct slgt_desc*)info->bufs;
info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count;