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

Commit 88b2608c authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

vme: bridges: use pci_zalloc_consistent



Remove the now unnecessary memset too.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Manohar Vanga <manohar.vanga@gmail.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d54d7796
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge,
	}

	/* Allocate mem for CR/CSR image */
	bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
	bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
						     &bridge->crcsr_bus);
	if (bridge->crcsr_kernel == NULL) {
		dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR "
@@ -1563,8 +1563,6 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge,
		return -ENOMEM;
	}

	memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE);

	crcsr_addr = slot * (512 * 1024);
	iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO);

+2 −4
Original line number Diff line number Diff line
@@ -2275,7 +2275,7 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
	bridge = tsi148_bridge->driver_priv;

	/* Allocate mem for CR/CSR image */
	bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
	bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
						     &bridge->crcsr_bus);
	if (bridge->crcsr_kernel == NULL) {
		dev_err(tsi148_bridge->parent, "Failed to allocate memory for "
@@ -2283,8 +2283,6 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge,
		return -ENOMEM;
	}

	memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE);

	reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low);

	iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU);