diff options
Diffstat (limited to 'drivers/char/xillybus')
-rw-r--r-- | drivers/char/xillybus/xillybus.h | 1 | ||||
-rw-r--r-- | drivers/char/xillybus/xillybus_core.c | 2 | ||||
-rw-r--r-- | drivers/char/xillybus/xillybus_pcie.c | 16 |
3 files changed, 7 insertions, 12 deletions
diff --git a/drivers/char/xillybus/xillybus.h b/drivers/char/xillybus/xillybus.h index 7c71bdef7ccb..55d47cb13a7b 100644 --- a/drivers/char/xillybus/xillybus.h +++ b/drivers/char/xillybus/xillybus.h @@ -87,7 +87,6 @@ struct xilly_channel { }; struct xilly_endpoint { - struct pci_dev *pdev; struct device *dev; struct xilly_endpoint_hardware *ephw; diff --git a/drivers/char/xillybus/xillybus_core.c b/drivers/char/xillybus/xillybus_core.c index 931d0bf4cec6..0ced9ec6977f 100644 --- a/drivers/char/xillybus/xillybus_core.c +++ b/drivers/char/xillybus/xillybus_core.c @@ -1783,7 +1783,7 @@ struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev, if (!endpoint) return NULL; - endpoint->pdev = pdev; + (void)pdev; // silence a compiler warning, will be removed endpoint->dev = dev; endpoint->ephw = ephw; endpoint->msg_counter = 0x0b; diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c index 8360427e4226..f4be61349ca6 100644 --- a/drivers/char/xillybus/xillybus_pcie.c +++ b/drivers/char/xillybus/xillybus_pcie.c @@ -48,10 +48,8 @@ static void xilly_dma_sync_single_for_cpu_pci(struct xilly_endpoint *ep, size_t size, int direction) { - pci_dma_sync_single_for_cpu(ep->pdev, - dma_handle, - size, - xilly_pci_direction(direction)); + dma_sync_single_for_cpu(ep->dev, dma_handle, size, + xilly_pci_direction(direction)); } static void xilly_dma_sync_single_for_device_pci(struct xilly_endpoint *ep, @@ -59,10 +57,8 @@ static void xilly_dma_sync_single_for_device_pci(struct xilly_endpoint *ep, size_t size, int direction) { - pci_dma_sync_single_for_device(ep->pdev, - dma_handle, - size, - xilly_pci_direction(direction)); + dma_sync_single_for_device(ep->dev, dma_handle, size, + xilly_pci_direction(direction)); } static void xilly_pci_unmap(void *ptr) @@ -98,9 +94,9 @@ static int xilly_map_single_pci(struct xilly_endpoint *ep, pci_direction = xilly_pci_direction(direction); - addr = pci_map_single(ep->pdev, ptr, size, pci_direction); + addr = dma_map_single(ep->dev, ptr, size, pci_direction); - if (pci_dma_mapping_error(ep->pdev, addr)) { + if (dma_mapping_error(ep->dev, addr)) { kfree(this); return -ENODEV; } |