Commit ddd05979 authored by Souptick Joarder's avatar Souptick Joarder Committed by Felipe Balbi

usb: gadget: udc: bdc: Use dma_pool_zalloc

Use dma_pool_zalloc instead of dma_pool_alloc + memset
Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 6d5b53c1
...@@ -151,7 +151,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep) ...@@ -151,7 +151,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
if (!bd_table) if (!bd_table)
goto fail; goto fail;
bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool, bd_table->start_bd = dma_pool_zalloc(bdc->bd_table_pool,
GFP_ATOMIC, GFP_ATOMIC,
&dma); &dma);
if (!bd_table->start_bd) { if (!bd_table->start_bd) {
...@@ -167,7 +167,6 @@ static int ep_bd_list_alloc(struct bdc_ep *ep) ...@@ -167,7 +167,6 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
(unsigned long long)bd_table->dma, prev_table); (unsigned long long)bd_table->dma, prev_table);
ep->bd_list.bd_table_array[index] = bd_table; ep->bd_list.bd_table_array[index] = bd_table;
memset(bd_table->start_bd, 0, bd_p_tab * sizeof(struct bdc_bd));
if (prev_table) if (prev_table)
chain_table(prev_table, bd_table, bd_p_tab); chain_table(prev_table, bd_table, bd_p_tab);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment