[PATCH 5.4 46/76] ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI

From: Greg Kroah-Hartman
Date: Mon Jan 18 2021 - 14:09:49 EST


From: Shawn Guo <shawn.guo@xxxxxxxxxx>

[ Upstream commit ee61cfd955a64a58ed35cbcfc54068fcbd486945 ]

It adds a stub acpi_create_platform_device() for !CONFIG_ACPI build, so
that caller doesn't have to deal with !CONFIG_ACPI build issue.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Shawn Guo <shawn.guo@xxxxxxxxxx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
include/linux/acpi.h | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index ce29a014e591c..dd6170357ec72 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -837,6 +837,13 @@ static inline int acpi_device_modalias(struct device *dev,
return -ENODEV;
}

+static inline struct platform_device *
+acpi_create_platform_device(struct acpi_device *adev,
+ struct property_entry *properties)
+{
+ return NULL;
+}
+
static inline bool acpi_dma_supported(struct acpi_device *adev)
{
return false;
--
2.27.0