Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d8784df authored by Michael Moese's avatar Michael Moese Committed by Greg Kroah-Hartman
Browse files

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: default avatarMichael Moese <michael.moese@men.de>
Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15bb81d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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",
+1 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ struct mcb_device {
	int rev;
	struct resource irq;
	struct resource mem;
	struct device *dma_dev;
};

static inline struct mcb_device *to_mcb_device(struct device *dev)