diff options
| author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:30 -0400 |
| commit | 88b2608c49b7fe3d9131d5a1d4a03438a589997c (patch) | |
| tree | af093db288a199796c54f4922c4face2fe9a5316 /drivers/vme | |
| parent | d54d7796c5f86eea0748a185b56ffb74ebc050e6 (diff) | |
vme: bridges: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Manohar Vanga <manohar.vanga@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/vme')
| -rw-r--r-- | drivers/vme/bridges/vme_ca91cx42.c | 6 | ||||
| -rw-r--r-- | drivers/vme/bridges/vme_tsi148.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index bfb2d3f06738..18078ecbfcc6 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/drivers/vme/bridges/vme_ca91cx42.c | |||
| @@ -1555,16 +1555,14 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge, | |||
| 1555 | } | 1555 | } |
| 1556 | 1556 | ||
| 1557 | /* Allocate mem for CR/CSR image */ | 1557 | /* Allocate mem for CR/CSR image */ |
| 1558 | bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, | 1558 | bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE, |
| 1559 | &bridge->crcsr_bus); | 1559 | &bridge->crcsr_bus); |
| 1560 | if (bridge->crcsr_kernel == NULL) { | 1560 | if (bridge->crcsr_kernel == NULL) { |
| 1561 | dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR " | 1561 | dev_err(&pdev->dev, "Failed to allocate memory for CR/CSR " |
| 1562 | "image\n"); | 1562 | "image\n"); |
| 1563 | return -ENOMEM; | 1563 | return -ENOMEM; |
| 1564 | } | 1564 | } |
| 1565 | 1565 | ||
| 1566 | memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); | ||
| 1567 | |||
| 1568 | crcsr_addr = slot * (512 * 1024); | 1566 | crcsr_addr = slot * (512 * 1024); |
| 1569 | iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO); | 1567 | iowrite32(bridge->crcsr_bus - crcsr_addr, bridge->base + VCSR_TO); |
| 1570 | 1568 | ||
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index 61e706c0e00c..e07cfa8001bb 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c | |||
| @@ -2275,16 +2275,14 @@ static int tsi148_crcsr_init(struct vme_bridge *tsi148_bridge, | |||
| 2275 | bridge = tsi148_bridge->driver_priv; | 2275 | bridge = tsi148_bridge->driver_priv; |
| 2276 | 2276 | ||
| 2277 | /* Allocate mem for CR/CSR image */ | 2277 | /* Allocate mem for CR/CSR image */ |
| 2278 | bridge->crcsr_kernel = pci_alloc_consistent(pdev, VME_CRCSR_BUF_SIZE, | 2278 | bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE, |
| 2279 | &bridge->crcsr_bus); | 2279 | &bridge->crcsr_bus); |
| 2280 | if (bridge->crcsr_kernel == NULL) { | 2280 | if (bridge->crcsr_kernel == NULL) { |
| 2281 | dev_err(tsi148_bridge->parent, "Failed to allocate memory for " | 2281 | dev_err(tsi148_bridge->parent, "Failed to allocate memory for " |
| 2282 | "CR/CSR image\n"); | 2282 | "CR/CSR image\n"); |
| 2283 | return -ENOMEM; | 2283 | return -ENOMEM; |
| 2284 | } | 2284 | } |
| 2285 | 2285 | ||
| 2286 | memset(bridge->crcsr_kernel, 0, VME_CRCSR_BUF_SIZE); | ||
| 2287 | |||
| 2288 | reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low); | 2286 | reg_split(bridge->crcsr_bus, &crcsr_bus_high, &crcsr_bus_low); |
| 2289 | 2287 | ||
| 2290 | iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU); | 2288 | iowrite32be(crcsr_bus_high, bridge->base + TSI148_LCSR_CROU); |
