summaryrefslogtreecommitdiffstats
path: root/drivers/mcb
diff options
context:
space:
mode:
authorMichael Moese <michael.moese@men.de>2016-09-14 12:05:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-27 12:33:47 +0200
commit2d8784df1a1c11ace4e244780facec1e945c5b4f (patch)
tree5a29e7d2bcd98873dd13470ac492206a0b1292fa /drivers/mcb
parent15bb81d334e99081e105b76e6d0b46657b4f4f2e (diff)
downloadop-kernel-dev-2d8784df1a1c11ace4e244780facec1e945c5b4f.zip
op-kernel-dev-2d8784df1a1c11ace4e244780facec1e945c5b4f.tar.gz
mcb: Add a dma_device to mcb_device
When performing DMA operations on a MCB device, the device needed for using the DMA API is "mcb_device->bus_carrier". This is rather lengthy, so a shortcut is introduced to struct mcb_device in order to ensure the MCB device driver uses the correct device for DMA operations. Signed-off-by: Michael Moese <michael.moese@men.de> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb')
-rw-r--r--drivers/mcb/mcb-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index 5306966..921a5d2 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -233,6 +233,7 @@ int mcb_device_register(struct mcb_bus *bus, struct mcb_device *dev)
dev->dev.bus = &mcb_bus_type;
dev->dev.parent = bus->dev.parent;
dev->dev.release = mcb_release_dev;
+ dev->dma_dev = bus->carrier;
device_id = dev->id;
dev_set_name(&dev->dev, "mcb%d-16z%03d-%d:%d:%d",
OpenPOWER on IntegriCloud