Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1224226 > unrolled thread

[PATCH 01/16] usb: gadget: amd5536udc: introduce free_dma_pools

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2015-09-14 17:20 +0200
Last post2015-09-14 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 01/16] usb: gadget: amd5536udc: introduce free_dma_pools Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-14 17:20 +0200

#1224226 — [PATCH 01/16] usb: gadget: amd5536udc: introduce free_dma_pools

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2015-09-14 17:20 +0200
Subject[PATCH 01/16] usb: gadget: amd5536udc: introduce free_dma_pools
Message-ID<q8DHY-1xe-17@gated-at.bofh.it>
dma pools are being created by init_dma_pools() but there was no
function for freeing them. Introduce the function now so that we can use
it later.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/usb/gadget/udc/amd5536udc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c
index fdacddb..384b824 100644
--- a/drivers/usb/gadget/udc/amd5536udc.c
+++ b/drivers/usb/gadget/udc/amd5536udc.c
@@ -3107,6 +3107,17 @@ static void udc_remove(struct udc *dev)
 	udc = NULL;
 }
 
+/* free all the dma pools */
+static void free_dma_pools(struct udc *dev)
+{
+	dma_pool_free(dev->stp_requests, dev->ep[UDC_EP0OUT_IX].td,
+		      dev->ep[UDC_EP0OUT_IX].td_phys);
+	dma_pool_free(dev->stp_requests, dev->ep[UDC_EP0OUT_IX].td_stp,
+		      dev->ep[UDC_EP0OUT_IX].td_stp_dma);
+	dma_pool_destroy(dev->stp_requests);
+	dma_pool_destroy(dev->data_requests);
+}
+
 /* Reset all pci context */
 static void udc_pci_remove(struct pci_dev *pdev)
 {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web