* [PATCH] drivers core: export symbols for device hotplug
@ 2020-11-26 15:01 Chanho Park
2020-11-26 17:21 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Chanho Park @ 2020-11-26 15:01 UTC (permalink / raw)
To: gregkh, rafael; +Cc: linux-kernel, Chanho Park
To support module build for cpu hotplug driver on type-1 hypervisor
such as drivers/xen/cpu_hotplug.c, we need to export below four symbols.
lock_device_hotplug / unlock_device_hotplug
device_online / device_offline
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
drivers/base/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index d661ada1518f..1bfd0c54a778 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1586,11 +1586,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)
{
@@ -3419,6 +3421,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().
@@ -3450,6 +3453,7 @@ int device_online(struct device *dev)
return ret;
}
+EXPORT_SYMBOL_GPL(device_online);
struct root_device {
struct device dev;
--
2.23.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drivers core: export symbols for device hotplug
2020-11-26 15:01 [PATCH] drivers core: export symbols for device hotplug Chanho Park
@ 2020-11-26 17:21 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2020-11-26 17:21 UTC (permalink / raw)
To: Chanho Park; +Cc: rafael, linux-kernel, Chanho Park
On Fri, Nov 27, 2020 at 12:01:38AM +0900, Chanho Park wrote:
> To support module build for cpu hotplug driver on type-1 hypervisor
> such as drivers/xen/cpu_hotplug.c, we need to export below four symbols.
>
> lock_device_hotplug / unlock_device_hotplug
> device_online / device_offline
>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
> drivers/base/core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index d661ada1518f..1bfd0c54a778 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1586,11 +1586,13 @@ void lock_device_hotplug(void)
> {
> mutex_lock(&device_hotplug_lock);
> }
> +EXPORT_SYMBOL_GPL(lock_device_hotplug);
Ick, really? Anyway, where is the follow-on patch that uses this in a
module? We need that in order to export these otherwise we will just
un-export them with no in-kernel users.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-26 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 15:01 [PATCH] drivers core: export symbols for device hotplug Chanho Park
2020-11-26 17:21 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®