aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:24:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:28 -0400
commit59e2623b433552d7402dfacd2bc2d7a22a360a4f (patch)
tree48364c28492d8cc2cc82ce8cf1c9f4f6b6783ccc
parent9011a67b2fe9b89048bcba81745ef34394f6f7ab (diff)
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>
-rw-r--r--drivers/gpu/drm/i810/i810_dma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index e88bac1d781f..bae897de9468 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -393,15 +393,14 @@ static int i810_dma_initialize(struct drm_device *dev,
393 393
394 /* Program Hardware Status Page */ 394 /* Program Hardware Status Page */
395 dev_priv->hw_status_page = 395 dev_priv->hw_status_page =
396 pci_alloc_consistent(dev->pdev, PAGE_SIZE, 396 pci_zalloc_consistent(dev->pdev, PAGE_SIZE,
397 &dev_priv->dma_status_page); 397 &dev_priv->dma_status_page);
398 if (!dev_priv->hw_status_page) { 398 if (!dev_priv->hw_status_page) {
399 dev->dev_private = (void *)dev_priv; 399 dev->dev_private = (void *)dev_priv;
400 i810_dma_cleanup(dev); 400 i810_dma_cleanup(dev);
401 DRM_ERROR("Can not allocate hardware status page\n"); 401 DRM_ERROR("Can not allocate hardware status page\n");
402 return -ENOMEM; 402 return -ENOMEM;
403 } 403 }
404 memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
405 DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page); 404 DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);
406 405
407 I810_WRITE(0x02080, dev_priv->dma_status_page); 406 I810_WRITE(0x02080, dev_priv->dma_status_page);