diff options
author | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-10-16 19:12:24 +0300 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2015-10-16 19:12:24 +0300 |
commit | 0708fc352c6ddb375ca9a14b2c2ce6d5342b4720 (patch) | |
tree | 4b481dbddbd1b222df0171782eb508638cab3b61 /drivers/of/platform.c | |
parent | bca37914c7bbcf5f616fe09a35a6001d001138cc (diff) | |
parent | ece3b3864848fa1a38c10078559c951886a2c1ea (diff) |
Automatically merging tracking-integration-linux-qcomlt into merge-linux-linaroll-20151016.0ll_20151016.0
Conflicting files:
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 1001efaedcb8..338b6744ff1e 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -150,11 +150,6 @@ struct platform_device *of_device_alloc(struct device_node *np, } EXPORT_SYMBOL(of_device_alloc); -static void of_dma_deconfigure(struct device *dev) -{ - arch_teardown_dma_ops(dev); -} - /** * of_platform_device_create_pdata - Alloc, initialize and register an of_device * @np: pointer to node to create device for @@ -183,11 +178,10 @@ static struct platform_device *of_platform_device_create_pdata( dev->dev.bus = &platform_bus_type; dev->dev.platform_data = platform_data; - of_dma_configure(&dev->dev, dev->dev.of_node); + of_dma_configure_masks(&dev->dev, dev->dev.of_node); of_msi_configure(&dev->dev, dev->dev.of_node); if (of_device_add(dev) != 0) { - of_dma_deconfigure(&dev->dev); platform_device_put(dev); goto err_clear_flag; } @@ -247,7 +241,8 @@ static struct amba_device *of_amba_device_create(struct device_node *node, dev_set_name(&dev->dev, "%s", bus_id); else of_device_make_bus_id(&dev->dev); - of_dma_configure(&dev->dev, dev->dev.of_node); + of_dma_configure_masks(&dev->dev, dev->dev.of_node); + of_dma_configure_ops(&dev->dev, dev->dev.of_node); /* Allow the HW Peripheral ID to be overridden */ prop = of_get_property(node, "arm,primecell-periphid", NULL); @@ -479,11 +474,12 @@ static int of_platform_device_destroy(struct device *dev, void *data) if (dev->bus == &platform_bus_type) platform_device_unregister(to_platform_device(dev)); #ifdef CONFIG_ARM_AMBA - else if (dev->bus == &amba_bustype) + else if (dev->bus == &amba_bustype) { amba_device_unregister(to_amba_device(dev)); + of_dma_deconfigure(dev); + } #endif - of_dma_deconfigure(dev); of_node_clear_flag(dev->of_node, OF_POPULATED); of_node_clear_flag(dev->of_node, OF_POPULATED_BUS); return 0; |