summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/bdc/bdc_ep.c
diff options
context:
space:
mode:
authorSouptick Joarder <jrdr.linux@gmail.com>2018-02-14 21:29:13 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-03-08 16:12:00 +0300
commitddd05979f89cbbbd94dd4186f5ed5b2262cc1d9f (patch)
tree3c77ad612c8bf2383df1b8e52f7960e3c76db88c /drivers/usb/gadget/udc/bdc/bdc_ep.c
parent6d5b53c1fd5c3d57c92667c8ff644557bcdb9656 (diff)
downloadlinux-ddd05979f89cbbbd94dd4186f5ed5b2262cc1d9f.tar.xz
usb: gadget: udc: bdc: Use dma_pool_zalloc
Use dma_pool_zalloc instead of dma_pool_alloc + memset Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/bdc/bdc_ep.c')
-rw-r--r--drivers/usb/gadget/udc/bdc/bdc_ep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c
index f40d4c13cfa4..03149b9d7ea7 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_ep.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c
@@ -151,7 +151,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
if (!bd_table)
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,
&dma);
if (!bd_table->start_bd) {
@@ -167,7 +167,6 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
(unsigned long long)bd_table->dma, prev_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)
chain_table(prev_table, bd_table, bd_p_tab);