[PATCH v2 09/14] driver: base: cpu: Export device_online/offline

From: Qais Yousef
Date: Mon Nov 25 2019 - 06:28:40 EST


And the {lock,unlock}_device_hotplug so that they can be used from
modules.

This is in preparation to replace cpu_up/down with
device_online/offline; which kernel/torture.c will require to be
exported to be built as a module.

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Qais Yousef <qais.yousef@xxxxxxx>
CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
CC: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
CC: linux-kernel@xxxxxxxxxxxxxxx
---
drivers/base/core.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 7bd9cd366d41..29b40c71b1ba 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -883,11 +883,13 @@ void lock_device_hotplug(void)
{
mutex_lock(&device_hotplug_lock);
}
+EXPORT_SYMBOL_GPL(lock_device_hotplug);

void unlock_device_hotplug(void)
{
mutex_unlock(&device_hotplug_lock);
}
+EXPORT_SYMBOL_GPL(unlock_device_hotplug);

int lock_device_hotplug_sysfs(void)
{
@@ -2679,6 +2681,7 @@ int device_offline(struct device *dev)

return ret;
}
+EXPORT_SYMBOL_GPL(device_offline);

/**
* device_online - Put the device back online after successful device_offline().
@@ -2710,6 +2713,7 @@ int device_online(struct device *dev)

return ret;
}
+EXPORT_SYMBOL_GPL(device_online);

struct root_device {
struct device dev;
--
2.17.1