Commit 59e2623b authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

i810: use pci_zalloc_consistent



Remove the now unnecessary memset too.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9011a67b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -393,7 +393,7 @@ static int i810_dma_initialize(struct drm_device *dev,

	/* Program Hardware Status Page */
	dev_priv->hw_status_page =
	    pci_alloc_consistent(dev->pdev, PAGE_SIZE,
		pci_zalloc_consistent(dev->pdev, PAGE_SIZE,
				      &dev_priv->dma_status_page);
	if (!dev_priv->hw_status_page) {
		dev->dev_private = (void *)dev_priv;
@@ -401,7 +401,6 @@ static int i810_dma_initialize(struct drm_device *dev,
		DRM_ERROR("Can not allocate hardware status page\n");
		return -ENOMEM;
	}
	memset(dev_priv->hw_status_page, 0, PAGE_SIZE);
	DRM_DEBUG("hw status page @ %p\n", dev_priv->hw_status_page);

	I810_WRITE(0x02080, dev_priv->dma_status_page);