aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/xillybus/xillybus.h6
-rw-r--r--drivers/char/xillybus/xillybus_pcie.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/char/xillybus/xillybus.h b/drivers/char/xillybus/xillybus.h
index c63ffc56637c..7c71bdef7ccb 100644
--- a/drivers/char/xillybus/xillybus.h
+++ b/drivers/char/xillybus/xillybus.h
@@ -87,10 +87,6 @@ struct xilly_channel {
};
struct xilly_endpoint {
- /*
- * One of pdev and dev is always NULL, and the other is a valid
- * pointer, depending on the type of device
- */
struct pci_dev *pdev;
struct device *dev;
struct xilly_endpoint_hardware *ephw;
@@ -131,7 +127,7 @@ struct xilly_endpoint_hardware {
};
struct xilly_mapping {
- void *device;
+ struct device *device;
dma_addr_t dma_addr;
size_t size;
int direction;
diff --git a/drivers/char/xillybus/xillybus_pcie.c b/drivers/char/xillybus/xillybus_pcie.c
index be25bfdb0d9a..8360427e4226 100644
--- a/drivers/char/xillybus/xillybus_pcie.c
+++ b/drivers/char/xillybus/xillybus_pcie.c
@@ -69,8 +69,8 @@ static void xilly_pci_unmap(void *ptr)
{
struct xilly_mapping *data = ptr;
- pci_unmap_single(data->device, data->dma_addr,
- data->size, data->direction);
+ dma_unmap_single(data->device, data->dma_addr, data->size,
+ data->direction);
kfree(ptr);
}
@@ -105,7 +105,7 @@ static int xilly_map_single_pci(struct xilly_endpoint *ep,
return -ENODEV;
}
- this->device = ep->pdev;
+ this->device = ep->dev;
this->dma_addr = addr;
this->size = size;
this->direction = pci_direction;