diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:26 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-19 00:39:55 -0400 |
| commit | 9e3288dc9a94fab5ea87db42177d3a9e0345a614 (patch) | |
| tree | d2b4f25677fcf9e7026040f7452c9e4f2953186c /drivers/of | |
| parent | c5f5849bffb36478dd8a1e350860ff18b654bc44 (diff) | |
of/device: Fix build errors for non-ppc and non-microblaze
Only powerpc and microblaze supply (struct device *)->archdata.dma_mask.
This patch stops referencing it on other architectures.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/of')
| -rw-r--r-- | drivers/of/platform.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index c52a798684a9..9d3d932bcb6f 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
| @@ -16,7 +16,9 @@ | |||
| 16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
| 17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
| 18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
| 19 | #include <linux/of_address.h> | ||
| 19 | #include <linux/of_device.h> | 20 | #include <linux/of_device.h> |
| 21 | #include <linux/of_irq.h> | ||
| 20 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
| 21 | 23 | ||
| 22 | #if defined(CONFIG_PPC_DCR) | 24 | #if defined(CONFIG_PPC_DCR) |
| @@ -511,7 +513,9 @@ struct of_device *of_device_alloc(struct device_node *np, | |||
| 511 | } | 513 | } |
| 512 | 514 | ||
| 513 | dev->dev.of_node = of_node_get(np); | 515 | dev->dev.of_node = of_node_get(np); |
| 516 | #if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) | ||
| 514 | dev->dev.dma_mask = &dev->archdata.dma_mask; | 517 | dev->dev.dma_mask = &dev->archdata.dma_mask; |
| 518 | #endif | ||
| 515 | dev->dev.parent = parent; | 519 | dev->dev.parent = parent; |
| 516 | dev->dev.release = of_release_dev; | 520 | dev->dev.release = of_release_dev; |
| 517 | 521 | ||
| @@ -540,7 +544,9 @@ struct of_device *of_platform_device_create(struct device_node *np, | |||
| 540 | if (!dev) | 544 | if (!dev) |
| 541 | return NULL; | 545 | return NULL; |
| 542 | 546 | ||
| 547 | #if defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE) | ||
| 543 | dev->archdata.dma_mask = 0xffffffffUL; | 548 | dev->archdata.dma_mask = 0xffffffffUL; |
| 549 | #endif | ||
| 544 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 550 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
| 545 | dev->dev.bus = &of_platform_bus_type; | 551 | dev->dev.bus = &of_platform_bus_type; |
| 546 | 552 | ||
