2019-10-30 15:43:40

by Qais Yousef

[permalink] [raw]
Subject: [PATCH 07/12] driver: base: cpu: export device_online/offline

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.

Signed-off-by: Qais Yousef <[email protected]>
CC: Greg Kroah-Hartman <[email protected]>
CC: "Rafael J. Wysocki" <[email protected]>
CC: [email protected]
---
drivers/base/core.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 2db62d98e395..3431cd0c9eac 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -882,11 +882,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)
{
@@ -2678,6 +2680,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().
@@ -2709,6 +2712,7 @@ int device_online(struct device *dev)

return ret;
}
+EXPORT_SYMBOL_GPL(device_online);

struct root_device {
struct device dev;
--
2.17.1


2019-11-02 17:19:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 07/12] driver: base: cpu: export device_online/offline

On Wed, Oct 30, 2019 at 03:38:32PM +0000, Qais Yousef wrote:
> 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.
>
> Signed-off-by: Qais Yousef <[email protected]>
> CC: Greg Kroah-Hartman <[email protected]>
> CC: "Rafael J. Wysocki" <[email protected]>
> CC: [email protected]
> ---
> drivers/base/core.c | 4 ++++
> 1 file changed, 4 insertions(+)

Acked-by: Greg Kroah-Hartman <[email protected]>