diff mbox series

[v2,1/2] of: module: Export of_device_uevent()

Message ID 20230609155634.1495338-2-miquel.raynal@bootlin.com
State Superseded, archived
Headers show
Series Small of/device cleanup | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Miquel Raynal June 9, 2023, 3:56 p.m. UTC
The content of of_device_uevent() is currently hardcoded in a driver
that can be compiled as a module. Nothing prevents of_device_uevent() to
be exported to modules, most of the other helpers in of/device.c
actually are. The reason why this helper was not exported is because it
has been so far only useful in drivers/base, which is built-in anyway.

With the idea of getting rid of the hardcoded implementation of
of_device_uevent() in other places in the kernel, let's export it to GPL
modules (very much like its cousins in the same file).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/of/device.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Rob Herring (Arm) June 14, 2023, 11:34 p.m. UTC | #1
On Fri, Jun 09, 2023 at 05:56:33PM +0200, Miquel Raynal wrote:
> The content of of_device_uevent() is currently hardcoded in a driver
> that can be compiled as a module. Nothing prevents of_device_uevent() to
> be exported to modules, most of the other helpers in of/device.c
> actually are. The reason why this helper was not exported is because it
> has been so far only useful in drivers/base, which is built-in anyway.
> 
> With the idea of getting rid of the hardcoded implementation of
> of_device_uevent() in other places in the kernel, let's export it to GPL
> modules (very much like its cousins in the same file).
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/of/device.c | 1 +
>  1 file changed, 1 insertion(+)

Assuming Thierry will pick this series up.

Acked-by: Rob Herring <robh@kernel.org>

> 
> diff --git a/drivers/of/device.c b/drivers/of/device.c
> index 0f00f1b80708..90131de6d75b 100644
> --- a/drivers/of/device.c
> +++ b/drivers/of/device.c
> @@ -312,6 +312,7 @@ void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
>  	}
>  	mutex_unlock(&of_mutex);
>  }
> +EXPORT_SYMBOL_GPL(of_device_uevent);
>  
>  int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
>  {
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 0f00f1b80708..90131de6d75b 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -312,6 +312,7 @@  void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 	}
 	mutex_unlock(&of_mutex);
 }
+EXPORT_SYMBOL_GPL(of_device_uevent);
 
 int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
 {