summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/net2280.c
diff options
context:
space:
mode:
authorRomain Perier <romain.perier@collabora.com>2017-03-08 17:19:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 18:03:31 +0900
commitfa9ed6f69d7dac9eb1a044f54570d3bcb3335295 (patch)
treefe6c2438720d980bafdd1b62ef6ec22ad964d351 /drivers/usb/gadget/udc/net2280.c
parent324c54fab707921d6c68a05e5829b9d87cc5d884 (diff)
downloadlinux-fa9ed6f69d7dac9eb1a044f54570d3bcb3335295.tar.bz2
usb: gadget: net2280: 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: Romain Perier <romain.perier@collabora.com> Acked-by: Peter Senna Tschudin <peter.senna@collabora.com> Tested-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/udc/net2280.c')
-rw-r--r--drivers/usb/gadget/udc/net2280.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c
index 3828c2ec8623..6cf07857eaca 100644
--- a/drivers/usb/gadget/udc/net2280.c
+++ b/drivers/usb/gadget/udc/net2280.c
@@ -569,7 +569,7 @@ static struct usb_request
if (ep->dma) {
struct net2280_dma *td;
- td = pci_pool_alloc(ep->dev->requests, gfp_flags,
+ td = dma_pool_alloc(ep->dev->requests, gfp_flags,
&req->td_dma);
if (!td) {
kfree(req);
@@ -597,7 +597,7 @@ static void net2280_free_request(struct usb_ep *_ep, struct usb_request *_req)
req = container_of(_req, struct net2280_request, req);
WARN_ON(!list_empty(&req->queue));
if (req->td)
- pci_pool_free(ep->dev->requests, req->td, req->td_dma);
+ dma_pool_free(ep->dev->requests, req->td, req->td_dma);
kfree(req);
}
@@ -3579,10 +3579,10 @@ static void net2280_remove(struct pci_dev *pdev)
for (i = 1; i < 5; i++) {
if (!dev->ep[i].dummy)
continue;
- pci_pool_free(dev->requests, dev->ep[i].dummy,
+ dma_pool_free(dev->requests, dev->ep[i].dummy,
dev->ep[i].td_dma);
}
- pci_pool_destroy(dev->requests);
+ dma_pool_destroy(dev->requests);
}
if (dev->got_irq)
free_irq(pdev->irq, dev);
@@ -3724,7 +3724,7 @@ static int net2280_probe(struct pci_dev *pdev, const struct pci_device_id *id)
/* DMA setup */
/* NOTE: we know only the 32 LSBs of dma addresses may be nonzero */
- dev->requests = pci_pool_create("requests", pdev,
+ dev->requests = dma_pool_create("requests", &pdev->dev,
sizeof(struct net2280_dma),
0 /* no alignment requirements */,
0 /* or page-crossing issues */);
@@ -3736,7 +3736,7 @@ static int net2280_probe(struct pci_dev *pdev, const struct pci_device_id *id)
for (i = 1; i < 5; i++) {
struct net2280_dma *td;
- td = pci_pool_alloc(dev->requests, GFP_KERNEL,
+ td = dma_pool_alloc(dev->requests, GFP_KERNEL,
&dev->ep[i].td_dma);
if (!td) {
ep_dbg(dev, "can't get dummy %d\n", i);