diff mbox

[1/5] ssb: add dma_dev to ssb_device structure

Message ID 201006040237.o542bOww001409@imap1.linux-foundation.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Andrew Morton June 4, 2010, 2:37 a.m. UTC
None
diff mbox

Patch

diff -puN drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure drivers/ssb/main.c
--- a/drivers/ssb/main.c~ssb-add-dma_dev-to-ssb_device-structure
+++ a/drivers/ssb/main.c
@@ -486,6 +486,7 @@  static int ssb_devices_register(struct s
 #ifdef CONFIG_SSB_PCIHOST
 			sdev->irq = bus->host_pci->irq;
 			dev->parent = &bus->host_pci->dev;
+			sdev->dma_dev = dev->parent;
 #endif
 			break;
 		case SSB_BUSTYPE_PCMCIA:
@@ -501,6 +502,7 @@  static int ssb_devices_register(struct s
 			break;
 		case SSB_BUSTYPE_SSB:
 			dev->dma_mask = &dev->coherent_dma_mask;
+			sdev->dma_dev = dev;
 			break;
 		}
 
diff -puN include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure include/linux/ssb/ssb.h
--- a/include/linux/ssb/ssb.h~ssb-add-dma_dev-to-ssb_device-structure
+++ a/include/linux/ssb/ssb.h
@@ -167,7 +167,7 @@  struct ssb_device {
 	 * is an optimization. */
 	const struct ssb_bus_ops *ops;
 
-	struct device *dev;
+	struct device *dev, *dma_dev;
 
 	struct ssb_bus *bus;
 	struct ssb_device_id id;