diff mbox

thermal: hwmon: EXPORT_SYMBOL for thermal hwmon sysfs

Message ID 87zipyz1w9.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Superseded, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Kuninori Morimoto July 4, 2016, 12:31 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

thermal_add_hwmon_sysfs()/thermal_remove_hwmon_sysfs() need
EXPORT_SYMBOL(). Otherwise we will have ERROR

>> ERROR: "thermal_remove_hwmon_sysfs" [drivers/thermal/rcar_thermal.ko] undefined!
>> ERROR: "thermal_add_hwmon_sysfs" [drivers/thermal/rcar_thermal.ko] undefined!

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 drivers/thermal/thermal_hwmon.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Geert Uytterhoeven July 4, 2016, 6:49 a.m. UTC | #1
Hi Morimoto-san,

On Mon, Jul 4, 2016 at 2:31 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> thermal_add_hwmon_sysfs()/thermal_remove_hwmon_sysfs() need
> EXPORT_SYMBOL(). Otherwise we will have ERROR
>
>>> ERROR: "thermal_remove_hwmon_sysfs" [drivers/thermal/rcar_thermal.ko] undefined!
>>> ERROR: "thermal_add_hwmon_sysfs" [drivers/thermal/rcar_thermal.ko] undefined!
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  drivers/thermal/thermal_hwmon.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
> index 06fd2ed9..8eecba8 100644
> --- a/drivers/thermal/thermal_hwmon.c
> +++ b/drivers/thermal/thermal_hwmon.c
> @@ -232,6 +232,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
>
>         return result;
>  }
> +EXPORT_SYMBOL(thermal_add_hwmon_sysfs);

EXPORT_SYMBOL_GPL?
That seems to be prevalent in the thermal subsystem, except for a few cases
in cpu_cooling.c and thermal_helpers.c.

>  void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
>  {
> @@ -270,3 +271,4 @@ void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
>         hwmon_device_unregister(hwmon->device);
>         kfree(hwmon);
>  }
> +EXPORT_SYMBOL(thermal_remove_hwmon_sysfs);

EXPORT_SYMBOL_GPL?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto July 4, 2016, 6:58 a.m. UTC | #2
Hi Geert

> > +EXPORT_SYMBOL(thermal_add_hwmon_sysfs);
> 
> EXPORT_SYMBOL_GPL?
> That seems to be prevalent in the thermal subsystem, except for a few cases
> in cpu_cooling.c and thermal_helpers.c.

Thanks.
Will fix in v2

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index 06fd2ed9..8eecba8 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -232,6 +232,7 @@  int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
 
 	return result;
 }
+EXPORT_SYMBOL(thermal_add_hwmon_sysfs);
 
 void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
 {
@@ -270,3 +271,4 @@  void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
 	hwmon_device_unregister(hwmon->device);
 	kfree(hwmon);
 }
+EXPORT_SYMBOL(thermal_remove_hwmon_sysfs);