Skip to content

Commit 59e2623

Browse files
JoePerchestorvalds
authored andcommitted
i810: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9011a67 commit 59e2623

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/gpu/drm/i810/i810_dma.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,14 @@ static int i810_dma_initialize(struct drm_device *dev,
393393

394394
/* Program Hardware Status Page */
395395
dev_priv->hw_status_page =
396-
pci_alloc_consistent(dev->pdev, PAGE_SIZE,
397-
&dev_priv->dma_status_page);
396+
pci_zalloc_consistent(dev->pdev, PAGE_SIZE,
397+
&dev_priv->dma_status_page);
398398
if (!dev_priv->hw_status_page) {
399399
dev->dev_private = (void *)dev_priv;
400400
i810_dma_cleanup(dev);
401401
DRM_ERROR("Can not allocate hardware status page\n");
402402
return -ENOMEM;
403403
}
404-
memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
405404
DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);
406405

407406
I810_WRITE(0x02080, dev_priv->dma_status_page);

0 commit comments

Comments
 (0)