mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
vme: bridges: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <[email protected]> Cc: Martyn Welch <[email protected]> Cc: Manohar Vanga <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d54d7796c5
commit
88b2608c49
2 changed files with 4 additions and 8 deletions
|
|
@ -1555,16 +1555,14 @@ 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_bus);
|
||||
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 "
|
||||
"image\n");
|
||||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -2275,16 +2275,14 @@ 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_bus);
|
||||
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 "
|
||||
"CR/CSR image\n");
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue