From 8c756a0a2de17f1535ef885ac7e556e016735eb2 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Thu, 31 Mar 2022 15:54:47 +0300 Subject: device property: Convert device_{dma_supported,get_dma_attr} to fwnode Make the device_dma_supported and device_get_dma_attr functions to use the fwnode ops, and move the implementation to ACPI and OF frameworks. Signed-off-by: Sakari Ailus Acked-by: Rob Herring Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki --- drivers/acpi/property.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/acpi/property.c') diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 12bbfe833609..24983c379aba 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@ -1256,6 +1256,17 @@ static bool acpi_fwnode_device_is_available(const struct fwnode_handle *fwnode) return acpi_device_is_present(to_acpi_device_node(fwnode)); } +static bool acpi_fwnode_device_dma_supported(const struct fwnode_handle *fwnode) +{ + return acpi_dma_supported(to_acpi_device_node(fwnode)); +} + +static enum dev_dma_attr +acpi_fwnode_device_get_dma_attr(const struct fwnode_handle *fwnode) +{ + return acpi_get_dma_attr(to_acpi_device_node(fwnode)); +} + static bool acpi_fwnode_property_present(const struct fwnode_handle *fwnode, const char *propname) { @@ -1387,6 +1398,9 @@ acpi_fwnode_device_get_match_data(const struct fwnode_handle *fwnode, const struct fwnode_operations ops = { \ .device_is_available = acpi_fwnode_device_is_available, \ .device_get_match_data = acpi_fwnode_device_get_match_data, \ + .device_dma_supported = \ + acpi_fwnode_device_dma_supported, \ + .device_get_dma_attr = acpi_fwnode_device_get_dma_attr, \ .property_present = acpi_fwnode_property_present, \ .property_read_int_array = \ acpi_fwnode_property_read_int_array, \ -- cgit v1.2.3