aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-mem.c
diff options
context:
space:
mode:
authorshashi bhusan2016-11-20 16:28:50 +0530
committerGreg Kroah-Hartman2016-11-21 17:33:40 +0100
commit8694f59c3b13222543bcf5585632637e0eec09ab (patch)
treea93438f71d535d2799c8bdfd0f8ae96103b0e7dd /drivers/usb/host/ohci-mem.c
parent1aba579f3cf51fd0fe0b4d46cc13823fd1200acb (diff)
USB: OHCI: use dma_pool_zalloc
We should use new API dma_pool_zalloc instead of dma_pool_alloc/memset. Signed-off-by: Shashi Bhusan <shashibhushan4u123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-mem.c')
-rw-r--r--drivers/usb/host/ohci-mem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
index c9e315c6808a..ed8a762b8670 100644
--- a/drivers/usb/host/ohci-mem.c
+++ b/drivers/usb/host/ohci-mem.c
@@ -88,10 +88,9 @@ td_alloc (struct ohci_hcd *hc, gfp_t mem_flags)
dma_addr_t dma;
struct td *td;
- td = dma_pool_alloc (hc->td_cache, mem_flags, &dma);
+ td = dma_pool_zalloc (hc->td_cache, mem_flags, &dma);
if (td) {
/* in case hc fetches it, make it look dead */
- memset (td, 0, sizeof *td);
td->hwNextTD = cpu_to_hc32 (hc, dma);
td->td_dma = dma;
/* hashed in td_fill */
@@ -122,9 +121,8 @@ ed_alloc (struct ohci_hcd *hc, gfp_t mem_flags)
dma_addr_t dma;
struct ed *ed;
- ed = dma_pool_alloc (hc->ed_cache, mem_flags, &dma);
+ ed = dma_pool_zalloc (hc->ed_cache, mem_flags, &dma);
if (ed) {
- memset (ed, 0, sizeof (*ed));
INIT_LIST_HEAD (&ed->td_list);
ed->dma = dma;
}