Commit dc3c0550 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

dma-mapping: remove dma_deconfigure



This goes through a lot of hooks just to call arch_teardown_dma_ops.
Replace it with a direct call instead.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
parent ccf640f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1428,7 +1428,7 @@ static int __init iort_add_platform_device(struct acpi_iort_node *node,
	return 0;

dma_deconfigure:
	acpi_dma_deconfigure(&pdev->dev);
	arch_teardown_dma_ops(&pdev->dev);
dev_put:
	platform_device_put(pdev);

+0 −10
Original line number Diff line number Diff line
@@ -1469,16 +1469,6 @@ int acpi_dma_configure(struct device *dev, enum dev_dma_attr attr)
}
EXPORT_SYMBOL_GPL(acpi_dma_configure);

/**
 * acpi_dma_deconfigure - Tear-down DMA configuration for the device.
 * @dev: The pointer to the device
 */
void acpi_dma_deconfigure(struct device *dev)
{
	arch_teardown_dma_ops(dev);
}
EXPORT_SYMBOL_GPL(acpi_dma_deconfigure);

static void acpi_init_coherency(struct acpi_device *adev)
{
	unsigned long long cca = 0;
+2 −2
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ re_probe:
	goto done;

probe_failed:
	dma_deconfigure(dev);
	arch_teardown_dma_ops(dev);
dma_failed:
	if (dev->bus)
		blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
@@ -968,7 +968,7 @@ static void __device_release_driver(struct device *dev, struct device *parent)
			drv->remove(dev);

		device_links_driver_cleanup(dev);
		dma_deconfigure(dev);
		arch_teardown_dma_ops(dev);

		devres_release_all(dev);
		dev->driver = NULL;
+0 −12
Original line number Diff line number Diff line
@@ -170,18 +170,6 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma)
}
EXPORT_SYMBOL_GPL(of_dma_configure);

/**
 * of_dma_deconfigure - Clean up DMA configuration
 * @dev:	Device for which to clean up DMA configuration
 *
 * Clean up all configuration performed by of_dma_configure_ops() and free all
 * resources that have been allocated.
 */
void of_dma_deconfigure(struct device *dev)
{
	arch_teardown_dma_ops(dev);
}

int of_device_register(struct platform_device *pdev)
{
	device_initialize(&pdev->dev);
+0 −1
Original line number Diff line number Diff line
@@ -595,7 +595,6 @@ enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev);
int acpi_dma_get_range(struct device *dev, u64 *dma_addr, u64 *offset,
		       u64 *size);
int acpi_dma_configure(struct device *dev, enum dev_dma_attr attr);
void acpi_dma_deconfigure(struct device *dev);

struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
					   u64 address, bool check_children);
Loading