diff mbox series

[1/4,RESEND] ACPI: scan: Export acpi_get_dma_attr()

Message ID 1647534311-2349-2-git-send-email-mikelley@microsoft.com
State New
Headers show
Series Fix coherence for VMbus and PCI pass-thru devices in Hyper-V VM | expand

Commit Message

Michael Kelley (LINUX) March 17, 2022, 4:25 p.m. UTC
Export acpi_get_dma_attr() so that it can be used by the Hyper-V
VMbus driver, which may be built as a module. The related function
acpi_dma_configure_id() is already exported.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
 drivers/acpi/scan.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Robin Murphy March 17, 2022, 4:31 p.m. UTC | #1
On 2022-03-17 16:25, Michael Kelley wrote:
> Export acpi_get_dma_attr() so that it can be used by the Hyper-V
> VMbus driver, which may be built as a module. The related function
> acpi_dma_configure_id() is already exported.

No. Use device_get_dma_attr() like everyone else, please.

Robin.

> Signed-off-by: Michael Kelley <mikelley@microsoft.com>
> ---
>   drivers/acpi/scan.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 1331756..9f3c88f 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -1489,6 +1489,7 @@ enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev)
>   	else
>   		return DEV_DMA_NON_COHERENT;
>   }
> +EXPORT_SYMBOL_GPL(acpi_get_dma_attr);
>   
>   /**
>    * acpi_dma_get_range() - Get device DMA parameters.
Michael Kelley (LINUX) March 17, 2022, 6:56 p.m. UTC | #2
From: Robin Murphy <robin.murphy@arm.com> Sent: Thursday, March 17, 2022 9:31 AM
> 
> On 2022-03-17 16:25, Michael Kelley wrote:
> > Export acpi_get_dma_attr() so that it can be used by the Hyper-V
> > VMbus driver, which may be built as a module. The related function
> > acpi_dma_configure_id() is already exported.
> 
> No. Use device_get_dma_attr() like everyone else, please.
>

Got it.  That works.

Michael
diff mbox series

Patch

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 1331756..9f3c88f 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1489,6 +1489,7 @@  enum dev_dma_attr acpi_get_dma_attr(struct acpi_device *adev)
 	else
 		return DEV_DMA_NON_COHERENT;
 }
+EXPORT_SYMBOL_GPL(acpi_get_dma_attr);
 
 /**
  * acpi_dma_get_range() - Get device DMA parameters.