Commit b5a6a4e5 authored by Romain Perier's avatar Romain Perier Committed by Greg Kroah-Hartman

usb: gadget: amd5536udc: Replace PCI pool old API

The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.
Signed-off-by: default avatarRomain Perier <romain.perier@collabora.com>
Acked-by: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Tested-by: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d293408e
...@@ -583,7 +583,7 @@ udc_alloc_request(struct usb_ep *usbep, gfp_t gfp) ...@@ -583,7 +583,7 @@ udc_alloc_request(struct usb_ep *usbep, gfp_t gfp)
if (ep->dma) { if (ep->dma) {
/* ep0 in requests are allocated from data pool here */ /* ep0 in requests are allocated from data pool here */
dma_desc = pci_pool_alloc(ep->dev->data_requests, gfp, dma_desc = dma_pool_alloc(ep->dev->data_requests, gfp,
&req->td_phys); &req->td_phys);
if (!dma_desc) { if (!dma_desc) {
kfree(req); kfree(req);
...@@ -622,7 +622,7 @@ static int udc_free_dma_chain(struct udc *dev, struct udc_request *req) ...@@ -622,7 +622,7 @@ static int udc_free_dma_chain(struct udc *dev, struct udc_request *req)
td = phys_to_virt(td_last->next); td = phys_to_virt(td_last->next);
for (i = 1; i < req->chain_len; i++) { for (i = 1; i < req->chain_len; i++) {
pci_pool_free(dev->data_requests, td, dma_pool_free(dev->data_requests, td,
(dma_addr_t)td_last->next); (dma_addr_t)td_last->next);
td_last = td; td_last = td;
td = phys_to_virt(td_last->next); td = phys_to_virt(td_last->next);
...@@ -652,7 +652,7 @@ udc_free_request(struct usb_ep *usbep, struct usb_request *usbreq) ...@@ -652,7 +652,7 @@ udc_free_request(struct usb_ep *usbep, struct usb_request *usbreq)
if (req->chain_len > 1) if (req->chain_len > 1)
udc_free_dma_chain(ep->dev, req); udc_free_dma_chain(ep->dev, req);
pci_pool_free(ep->dev->data_requests, req->td_data, dma_pool_free(ep->dev->data_requests, req->td_data,
req->td_phys); req->td_phys);
} }
kfree(req); kfree(req);
...@@ -847,7 +847,7 @@ static int udc_create_dma_chain( ...@@ -847,7 +847,7 @@ static int udc_create_dma_chain(
for (i = buf_len; i < bytes; i += buf_len) { for (i = buf_len; i < bytes; i += buf_len) {
/* create or determine next desc. */ /* create or determine next desc. */
if (create_new_chain) { if (create_new_chain) {
td = pci_pool_alloc(ep->dev->data_requests, td = dma_pool_alloc(ep->dev->data_requests,
gfp_flags, &dma_addr); gfp_flags, &dma_addr);
if (!td) if (!td)
return -ENOMEM; return -ENOMEM;
......
...@@ -545,8 +545,8 @@ struct udc { ...@@ -545,8 +545,8 @@ struct udc {
u32 __iomem *txfifo; u32 __iomem *txfifo;
/* DMA desc pools */ /* DMA desc pools */
struct pci_pool *data_requests; struct dma_pool *data_requests;
struct pci_pool *stp_requests; struct dma_pool *stp_requests;
/* device data */ /* device data */
unsigned long phys_addr; unsigned long phys_addr;
......
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