mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
micrel: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
12fe08b2b5
commit
a2d0abc6aa
1 changed files with 3 additions and 4 deletions
|
@ -4409,14 +4409,13 @@ static int ksz_alloc_desc(struct dev_info *adapter)
|
|||
DESC_ALIGNMENT;
|
||||
|
||||
adapter->desc_pool.alloc_virt =
|
||||
pci_alloc_consistent(
|
||||
adapter->pdev, adapter->desc_pool.alloc_size,
|
||||
&adapter->desc_pool.dma_addr);
|
||||
pci_zalloc_consistent(adapter->pdev,
|
||||
adapter->desc_pool.alloc_size,
|
||||
&adapter->desc_pool.dma_addr);
|
||||
if (adapter->desc_pool.alloc_virt == NULL) {
|
||||
adapter->desc_pool.alloc_size = 0;
|
||||
return 1;
|
||||
}
|
||||
memset(adapter->desc_pool.alloc_virt, 0, adapter->desc_pool.alloc_size);
|
||||
|
||||
/* Align to the next cache line boundary. */
|
||||
offset = (((ulong) adapter->desc_pool.alloc_virt % DESC_ALIGNMENT) ?
|
||||
|
|
Loading…
Reference in a new issue