
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I67QNJ CVE: NA --------------------------------------- This patch export the symbol of acpi_hotplug_schedule, and move the declaration of the acpi_hotplug_schedule in drivers/acpi/internal.h to include/linux/acpi.h. Drivers can use this function to online/offline the memory devices. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> --- drivers/acpi/internal.h | 1 - drivers/acpi/osl.c | 1 + include/linux/acpi.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 866c7c4ed233..253afdcf3aa9 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -77,7 +77,6 @@ static inline void acpi_lpss_init(void) {} void acpi_apd_init(void); -acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src); bool acpi_queue_hotplug_work(struct work_struct *work); void acpi_device_hotplug(struct acpi_device *adev, u32 src); bool acpi_scan_is_offline(struct acpi_device *adev, bool uevent); diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index f725813d0cce..ae4f9818b6b3 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1190,6 +1190,7 @@ acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src) } return AE_OK; } +EXPORT_SYMBOL_GPL(acpi_hotplug_schedule); bool acpi_queue_hotplug_work(struct work_struct *work) { diff --git a/include/linux/acpi.h b/include/linux/acpi.h index afd94c9b8b8a..1c2bb14975af 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1543,6 +1543,7 @@ static inline void acpi_init_ffh(void) { } #ifdef CONFIG_ACPI extern void acpi_device_notify(struct device *dev); extern void acpi_device_notify_remove(struct device *dev); +extern acpi_status acpi_hotplug_schedule(struct acpi_device *adev, u32 src); #else static inline void acpi_device_notify(struct device *dev) { } static inline void acpi_device_notify_remove(struct device *dev) { } -- 2.17.1