diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-17 23:56:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-17 23:56:30 -0700 |
commit | 1e42198609d73ed1a9adcba2af275c24c2678420 (patch) | |
tree | 32fd4d9073bfc0f3909af8f9fb4bcff38951d01a /drivers/ssb | |
parent | 794eb6bf20ebf992c040ea831cd3a9c64b0c1f7a (diff) | |
parent | 4b119e21d0c66c22e8ca03df05d9de623d0eb50f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/ssb')
-rw-r--r-- | drivers/ssb/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 6ce92e82b64e..7cf8851286b5 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -462,15 +462,18 @@ static int ssb_devices_register(struct ssb_bus *bus) #ifdef CONFIG_SSB_PCIHOST sdev->irq = bus->host_pci->irq; dev->parent = &bus->host_pci->dev; + sdev->dma_dev = &bus->host_pci->dev; #endif break; case SSB_BUSTYPE_PCMCIA: #ifdef CONFIG_SSB_PCMCIAHOST sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; dev->parent = &bus->host_pcmcia->dev; + sdev->dma_dev = &bus->host_pcmcia->dev; #endif break; case SSB_BUSTYPE_SSB: + sdev->dma_dev = dev; break; } @@ -1164,15 +1167,14 @@ EXPORT_SYMBOL(ssb_dma_translation); int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) { - struct device *dev = ssb_dev->dev; + struct device *dma_dev = ssb_dev->dma_dev; #ifdef CONFIG_SSB_PCIHOST - if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && - !dma_supported(dev, mask)) - return -EIO; + if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) + return dma_set_mask(dma_dev, mask); #endif - dev->coherent_dma_mask = mask; - dev->dma_mask = &dev->coherent_dma_mask; + dma_dev->coherent_dma_mask = mask; + dma_dev->dma_mask = &dma_dev->coherent_dma_mask; return 0; } |