diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-15 22:15:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-15 22:15:00 -0400 |
commit | c4cbb34bbdaaa841ef7c027f7b420db4c318c4fd (patch) | |
tree | 90f40954097eb686752e03ad7088bd9191345132 /drivers/ssb/main.c | |
parent | 0517deed78be9cc9ce9799bf15da58fd0d2078bb (diff) | |
parent | b358492cd2a9c67bff352c5a60d86e7fc9627477 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'drivers/ssb/main.c')
-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 72017bf2e577..8003a9e55ac4 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -436,15 +436,18 @@ static int ssb_devices_register(struct ssb_bus *bus) | |||
436 | #ifdef CONFIG_SSB_PCIHOST | 436 | #ifdef CONFIG_SSB_PCIHOST |
437 | sdev->irq = bus->host_pci->irq; | 437 | sdev->irq = bus->host_pci->irq; |
438 | dev->parent = &bus->host_pci->dev; | 438 | dev->parent = &bus->host_pci->dev; |
439 | sdev->dma_dev = &bus->host_pci->dev; | ||
439 | #endif | 440 | #endif |
440 | break; | 441 | break; |
441 | case SSB_BUSTYPE_PCMCIA: | 442 | case SSB_BUSTYPE_PCMCIA: |
442 | #ifdef CONFIG_SSB_PCMCIAHOST | 443 | #ifdef CONFIG_SSB_PCMCIAHOST |
443 | sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; | 444 | sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; |
444 | dev->parent = &bus->host_pcmcia->dev; | 445 | dev->parent = &bus->host_pcmcia->dev; |
446 | sdev->dma_dev = &bus->host_pcmcia->dev; | ||
445 | #endif | 447 | #endif |
446 | break; | 448 | break; |
447 | case SSB_BUSTYPE_SSB: | 449 | case SSB_BUSTYPE_SSB: |
450 | sdev->dma_dev = dev; | ||
448 | break; | 451 | break; |
449 | } | 452 | } |
450 | 453 | ||
@@ -1018,15 +1021,14 @@ EXPORT_SYMBOL(ssb_dma_translation); | |||
1018 | 1021 | ||
1019 | int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) | 1022 | int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) |
1020 | { | 1023 | { |
1021 | struct device *dev = ssb_dev->dev; | 1024 | struct device *dma_dev = ssb_dev->dma_dev; |
1022 | 1025 | ||
1023 | #ifdef CONFIG_SSB_PCIHOST | 1026 | #ifdef CONFIG_SSB_PCIHOST |
1024 | if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && | 1027 | if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI) |
1025 | !dma_supported(dev, mask)) | 1028 | return dma_set_mask(dma_dev, mask); |
1026 | return -EIO; | ||
1027 | #endif | 1029 | #endif |
1028 | dev->coherent_dma_mask = mask; | 1030 | dma_dev->coherent_dma_mask = mask; |
1029 | dev->dma_mask = &dev->coherent_dma_mask; | 1031 | dma_dev->dma_mask = &dma_dev->coherent_dma_mask; |
1030 | 1032 | ||
1031 | return 0; | 1033 | return 0; |
1032 | } | 1034 | } |