ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI
authorShawn Guo <shawn.guo@linaro.org>
Thu, 31 Dec 2020 11:35:25 +0000 (19:35 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Jan 2021 16:44:00 +0000 (17:44 +0100)
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@intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/acpi.h

index 2630c2e..053bf05 100644 (file)
@@ -885,6 +885,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;