Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38537b7f authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

irda: use pci_zalloc_consistent



Remove the now unnecessary memset too.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 440c734f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -485,13 +485,13 @@ static int vlsi_create_hwif(vlsi_irda_dev_t *idev)
	idev->virtaddr = NULL;
	idev->busaddr = 0;

	ringarea = pci_alloc_consistent(idev->pdev, HW_RING_AREA_SIZE, &idev->busaddr);
	ringarea = pci_zalloc_consistent(idev->pdev, HW_RING_AREA_SIZE,
					 &idev->busaddr);
	if (!ringarea) {
		IRDA_ERROR("%s: insufficient memory for descriptor rings\n",
			   __func__);
		goto out;
	}
	memset(ringarea, 0, HW_RING_AREA_SIZE);

	hwmap = (struct ring_descr_hw *)ringarea;
	idev->rx_ring = vlsi_alloc_ring(idev->pdev, hwmap, ringsize[1],