Re: [PATCH] thermal: core: export the governor register related API

From: Rafael J. Wysocki
Date: Thu Dec 28 2023 - 15:24:14 EST


On Thu, Dec 28, 2023 at 11:39 AM Di Shen <di.shen@xxxxxxxxxx> wrote:
>
> To enable users to register their own thermal governor,

Why would anyone want to do that?

> this patch
> exports thermal_register_governor() and thermal_unregister_governor().
> This change would not affect the registration of the default governor.
>
> Signed-off-by: Di Shen <di.shen@xxxxxxxxxx>
> ---
> drivers/thermal/thermal_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 9c17d35ccbbd..56695988e20f 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -167,6 +167,7 @@ int thermal_register_governor(struct thermal_governor *governor)
>
> return err;
> }
> +EXPORT_SYMBOL_GPL(thermal_register_governor);
>
> void thermal_unregister_governor(struct thermal_governor *governor)
> {
> @@ -193,6 +194,7 @@ void thermal_unregister_governor(struct thermal_governor *governor)
> exit:
> mutex_unlock(&thermal_governor_lock);
> }
> +EXPORT_SYMBOL_GPL(thermal_unregister_governor);
>
> int thermal_zone_device_set_policy(struct thermal_zone_device *tz,
> char *policy)
> --
> 2.17.1
>