diff options
author | Joe Perches <[email protected]> | 2014-08-08 14:24:08 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-08-08 15:57:28 -0700 |
commit | 82bf0baad9768c21850d06ddc24ea47984c4c90f (patch) | |
tree | 1581c443e36e67047466ac349086eee741fc5cf3 | |
parent | f7c65af5136f7999121f05a8398dd34a43bad139 (diff) |
pci-dma-compat: add pci_zalloc_consistent helper
Add this helper for consistency with pci_zalloc_coherent
and the ability to remove unnecessary memset(,0,) uses.
Signed-off-by: Joe Perches <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "John W. Linville" <[email protected]>
Cc: "Stephen M. Cameron" <[email protected]>
Cc: Adam Radford <[email protected]>
Cc: Chaoming Li <[email protected]>
Cc: Chas Williams <[email protected]>
Cc: Christian Benvenuti <[email protected]>
Cc: Christopher Harrer <[email protected]>
Cc: Dario Ballabio <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Don Fry <[email protected]>
Cc: Faisal Latif <[email protected]>
Cc: Forest Bond <[email protected]>
Cc: Govindarajulu Varadarajan <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Hal Rosenstock <[email protected]>
Cc: Hans Verkuil <[email protected]>
Cc: Jayamohan Kallickal <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Jitendra Kalsaria <[email protected]>
Cc: Larry Finger <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Cc: Lior Dotan <[email protected]>
Cc: Manish Chopra <[email protected]>
Cc: Manohar Vanga <[email protected]>
Cc: Martyn Welch <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Michael Neuffer <[email protected]>
Cc: Mirko Lindner <[email protected]>
Cc: Neel Patel <[email protected]>
Cc: Neela Syam Kolli <[email protected]>
Cc: Rajesh Borundia <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Ron Mercer <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Sean Hefty <[email protected]>
Cc: Shahed Shaikh <[email protected]>
Cc: Sony Chacko <[email protected]>
Cc: Stanislav Yakovlev <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Steve Wise <[email protected]>
Cc: Sujith Sankar <[email protected]>
Cc: Tom Tucker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | include/asm-generic/pci-dma-compat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-generic/pci-dma-compat.h b/include/asm-generic/pci-dma-compat.h index 1437b7da09b2..c110843fc53b 100644 --- a/include/asm-generic/pci-dma-compat.h +++ b/include/asm-generic/pci-dma-compat.h @@ -19,6 +19,14 @@ pci_alloc_consistent(struct pci_dev *hwdev, size_t size, return dma_alloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, dma_handle, GFP_ATOMIC); } +static inline void * +pci_zalloc_consistent(struct pci_dev *hwdev, size_t size, + dma_addr_t *dma_handle) +{ + return dma_zalloc_coherent(hwdev == NULL ? NULL : &hwdev->dev, + size, dma_handle, GFP_ATOMIC); +} + static inline void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) |