diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-03 10:25:08 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-05-03 10:25:08 -0400 |
commit | 3d6ce86ee79465e1b1b6e287f8ea26b553fc768e (patch) | |
tree | 5305a5ffefc514d485ae634e9d53b3e601fafbd3 /drivers/base/platform.c | |
parent | 07397df29e57cde5799af16e8f148ae10ed75285 (diff) |
drivers: remove force dma flag from buses
With each bus implementing its own DMA configuration callback, there is no
need for bus to explicitly set the force_dma flag. Modify the
of_dma_configure function to accept an input parameter which specifies if
implicit DMA configuration is required when it is not described by the
firmware.
Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com> # PCI parts
Reviewed-by: Rob Herring <robh@kernel.org>
[hch: tweaked the changelog a bit]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 638d42e93772..c0ff1e73a634 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -1136,7 +1136,7 @@ int platform_dma_configure(struct device *dev) | |||
1136 | int ret = 0; | 1136 | int ret = 0; |
1137 | 1137 | ||
1138 | if (dev->of_node) { | 1138 | if (dev->of_node) { |
1139 | ret = of_dma_configure(dev, dev->of_node); | 1139 | ret = of_dma_configure(dev, dev->of_node, true); |
1140 | } else if (has_acpi_companion(dev)) { | 1140 | } else if (has_acpi_companion(dev)) { |
1141 | attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode)); | 1141 | attr = acpi_get_dma_attr(to_acpi_device_node(dev->fwnode)); |
1142 | if (attr != DEV_DMA_NOT_SUPPORTED) | 1142 | if (attr != DEV_DMA_NOT_SUPPORTED) |
@@ -1159,7 +1159,6 @@ struct bus_type platform_bus_type = { | |||
1159 | .uevent = platform_uevent, | 1159 | .uevent = platform_uevent, |
1160 | .dma_configure = platform_dma_configure, | 1160 | .dma_configure = platform_dma_configure, |
1161 | .pm = &platform_dev_pm_ops, | 1161 | .pm = &platform_dev_pm_ops, |
1162 | .force_dma = true, | ||
1163 | }; | 1162 | }; |
1164 | EXPORT_SYMBOL_GPL(platform_bus_type); | 1163 | EXPORT_SYMBOL_GPL(platform_bus_type); |
1165 | 1164 | ||