diff options
author | Joe Perches <joe@perches.com> | 2014-08-08 17:24:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:29 -0400 |
commit | 7c845eb5e184977d9c7135ae20d012b59f8cc729 (patch) | |
tree | 71115a1f8b3528722917faf589171a4c690547ea /drivers/scsi/mesh.c | |
parent | 8ac41b9dc719b4a5c65a2192988e8199278bb71a (diff) |
scsi: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Adam Radford <linuxraid@lsi.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: Michael Neuffer <mike@i-Connect.Net>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/mesh.c')
-rw-r--r-- | drivers/scsi/mesh.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 7a6160f172ce..57a95e2c3442 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -1915,14 +1915,12 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) | |||
1915 | /* We use the PCI APIs for now until the generic one gets fixed | 1915 | /* We use the PCI APIs for now until the generic one gets fixed |
1916 | * enough or until we get some macio-specific versions | 1916 | * enough or until we get some macio-specific versions |
1917 | */ | 1917 | */ |
1918 | dma_cmd_space = pci_alloc_consistent(macio_get_pci_dev(mdev), | 1918 | dma_cmd_space = pci_zalloc_consistent(macio_get_pci_dev(mdev), |
1919 | ms->dma_cmd_size, | 1919 | ms->dma_cmd_size, &dma_cmd_bus); |
1920 | &dma_cmd_bus); | ||
1921 | if (dma_cmd_space == NULL) { | 1920 | if (dma_cmd_space == NULL) { |
1922 | printk(KERN_ERR "mesh: can't allocate DMA table\n"); | 1921 | printk(KERN_ERR "mesh: can't allocate DMA table\n"); |
1923 | goto out_unmap; | 1922 | goto out_unmap; |
1924 | } | 1923 | } |
1925 | memset(dma_cmd_space, 0, ms->dma_cmd_size); | ||
1926 | 1924 | ||
1927 | ms->dma_cmds = (struct dbdma_cmd *) DBDMA_ALIGN(dma_cmd_space); | 1925 | ms->dma_cmds = (struct dbdma_cmd *) DBDMA_ALIGN(dma_cmd_space); |
1928 | ms->dma_cmd_space = dma_cmd_space; | 1926 | ms->dma_cmd_space = dma_cmd_space; |