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>
This commit is contained in:

committed by
Linus Torvalds

parent
8ac41b9dc7
commit
7c845eb5e1
@@ -1238,8 +1238,8 @@ static int port_detect(unsigned long port_base, unsigned int j,
|
||||
struct eata_config *cf;
|
||||
dma_addr_t cf_dma_addr;
|
||||
|
||||
cf = pci_alloc_consistent(pdev, sizeof(struct eata_config),
|
||||
&cf_dma_addr);
|
||||
cf = pci_zalloc_consistent(pdev, sizeof(struct eata_config),
|
||||
&cf_dma_addr);
|
||||
|
||||
if (!cf) {
|
||||
printk
|
||||
@@ -1249,7 +1249,6 @@ static int port_detect(unsigned long port_base, unsigned int j,
|
||||
}
|
||||
|
||||
/* Set board configuration */
|
||||
memset((char *)cf, 0, sizeof(struct eata_config));
|
||||
cf->len = (ushort) H2DEV16((ushort) 510);
|
||||
cf->ocena = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user