From 6c2581ccaccbb96d979998126576d74a6e5ba9f5 Mon Sep 17 00:00:00 2001 From: Hyeonseong Gil Date: Fri, 23 Mar 2018 16:19:43 +0900 Subject: [PATCH] [COMMON] thermal: gpu_cooling: Remove unused get_static_t type Change-Id: I33eefffa5716cdc0c6bcb8af47ca32429b22833f Signed-off-by: Hyeonseong Gil --- drivers/thermal/gpu_cooling.c | 36 ++++++++--------------------------- include/linux/gpu_cooling.h | 16 +++++----------- 2 files changed, 13 insertions(+), 39 deletions(-) diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index 8170e8c7606b..a795d8f5a65f 100644 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -70,7 +70,6 @@ struct gpufreq_cooling_device { u32 last_load; struct power_table *dyn_power_table; int dyn_power_table_entries; - get_static_t plat_get_static_power; int *var_table; int *var_coeff; int *asv_coeff; @@ -825,8 +824,6 @@ int exynos_gpu_add_notifier(struct notifier_block *n) * @np: a valid struct device_node to the cooling device device tree node * @clip_gpus: gpumask of gpus where the frequency constraints will happen. * @capacitance: dynamic power coefficient for these gpus - * @plat_static_func: function to calculate the static power consumed by these - * gpus (optional) * * This interface function registers the gpufreq cooling device with the name * "thermal-gpufreq-%x". This api can support multiple instances of gpufreq @@ -838,8 +835,7 @@ int exynos_gpu_add_notifier(struct notifier_block *n) */ static struct thermal_cooling_device * __gpufreq_cooling_register(struct device_node *np, - const struct cpumask *clip_gpus, u32 capacitance, - get_static_t plat_static_func) + const struct cpumask *clip_gpus, u32 capacitance) { struct thermal_cooling_device *cool_dev; struct gpufreq_cooling_device *gpufreq_cdev = NULL; @@ -908,7 +904,7 @@ __gpufreq_cooling_register(struct device_node *np, struct thermal_cooling_device * gpufreq_cooling_register(const struct cpumask *clip_gpus) { - return __gpufreq_cooling_register(NULL, clip_gpus, 0, NULL); + return __gpufreq_cooling_register(NULL, clip_gpus, 0); } EXPORT_SYMBOL_GPL(gpufreq_cooling_register); @@ -932,7 +928,7 @@ of_gpufreq_cooling_register(struct device_node *np, if (!np) return ERR_PTR(-EINVAL); - return __gpufreq_cooling_register(np, clip_gpus, 0, NULL); + return __gpufreq_cooling_register(np, clip_gpus, 0); } EXPORT_SYMBOL_GPL(of_gpufreq_cooling_register); @@ -940,8 +936,6 @@ EXPORT_SYMBOL_GPL(of_gpufreq_cooling_register); * gpufreq_power_cooling_register() - create gpufreq cooling device with power extensions * @clip_gpus: gpumask of gpus where the frequency constraints will happen * @capacitance: dynamic power coefficient for these gpus - * @plat_static_func: function to calculate the static power consumed by these - * gpus (optional) * * This interface function registers the gpufreq cooling device with * the name "thermal-gpufreq-%x". This api can support multiple @@ -950,19 +944,13 @@ EXPORT_SYMBOL_GPL(of_gpufreq_cooling_register); * simple gpu power model. The gpus must have registered their OPPs * using the OPP library. * - * An optional @plat_static_func may be provided to calculate the - * static power consumed by these gpus. If the platform's static - * power consumption is unknown or negligible, make it NULL. - * * Return: a valid struct thermal_cooling_device pointer on success, * on failure, it returns a corresponding ERR_PTR(). */ struct thermal_cooling_device * -gpufreq_power_cooling_register(const struct cpumask *clip_gpus, u32 capacitance, - get_static_t plat_static_func) +gpufreq_power_cooling_register(const struct cpumask *clip_gpus, u32 capacitance) { - return __gpufreq_cooling_register(NULL, clip_gpus, capacitance, - plat_static_func); + return __gpufreq_cooling_register(NULL, clip_gpus, capacitance); } EXPORT_SYMBOL(gpufreq_power_cooling_register); @@ -971,8 +959,6 @@ EXPORT_SYMBOL(gpufreq_power_cooling_register); * @np: a valid struct device_node to the cooling device device tree node * @clip_gpus: gpumask of gpus where the frequency constraints will happen * @capacitance: dynamic power coefficient for these gpus - * @plat_static_func: function to calculate the static power consumed by these - * gpus (optional) * * This interface function registers the gpufreq cooling device with * the name "thermal-gpufreq-%x". This api can support multiple @@ -982,24 +968,18 @@ EXPORT_SYMBOL(gpufreq_power_cooling_register); * extensions by using a simple gpu power model. The gpus must have * registered their OPPs using the OPP library. * - * An optional @plat_static_func may be provided to calculate the - * static power consumed by these gpus. If the platform's static - * power consumption is unknown or negligible, make it NULL. - * * Return: a valid struct thermal_cooling_device pointer on success, * on failure, it returns a corresponding ERR_PTR(). */ struct thermal_cooling_device * of_gpufreq_power_cooling_register(struct device_node *np, const struct cpumask *clip_gpus, - u32 capacitance, - get_static_t plat_static_func) + u32 capacitance) { if (!np) return ERR_PTR(-EINVAL); - return __gpufreq_cooling_register(np, clip_gpus, capacitance, - plat_static_func); + return __gpufreq_cooling_register(np, clip_gpus, capacitance); } EXPORT_SYMBOL(of_gpufreq_power_cooling_register); @@ -1118,7 +1098,7 @@ static int __init exynos_gpu_cooling_init(void) } regist: - dev = __gpufreq_cooling_register(np, NULL, capacitance, NULL); + dev = __gpufreq_cooling_register(np, NULL, capacitance); if (IS_ERR(dev)) { pr_err("Fail to register gpufreq cooling\n"); diff --git a/include/linux/gpu_cooling.h b/include/linux/gpu_cooling.h index e12db2bc3758..6f43750425ae 100755 --- a/include/linux/gpu_cooling.h +++ b/include/linux/gpu_cooling.h @@ -31,9 +31,6 @@ #define GPU_TABLE_END ~1 -typedef int (*get_static_t)(cpumask_t *cpumask, int interval, - unsigned long voltage, u32 *power); - #ifdef CONFIG_GPU_THERMAL /** * gpufreq_cooling_register - function to create gpufreq cooling device. @@ -44,7 +41,7 @@ gpufreq_cooling_register(const struct cpumask *clip_gpus); struct thermal_cooling_device * gpufreq_power_cooling_register(const struct cpumask *clip_gpus, - u32 capacitance, get_static_t plat_static_func); + u32 capacitance); /** * of_gpufreq_cooling_register - create gpufreq cooling device based on DT. @@ -59,8 +56,7 @@ of_gpufreq_cooling_register(struct device_node *np, struct thermal_cooling_device * of_gpufreq_power_cooling_register(struct device_node *np, const struct cpumask *clip_gpus, - u32 capacitance, - get_static_t plat_static_func); + u32 capacitance); #else static inline struct thermal_cooling_device * of_gpufreq_cooling_register(struct device_node *np, @@ -72,8 +68,7 @@ of_gpufreq_cooling_register(struct device_node *np, static inline struct thermal_cooling_device * of_gpufreq_power_cooling_register(struct device_node *np, const struct cpumask *clip_gpus, - u32 capacitance, - get_static_t plat_static_func) + u32 capacitance); { return NULL; } @@ -95,7 +90,7 @@ gpufreq_cooling_register(const struct cpumask *clip_gpus) static inline struct thermal_cooling_device * gpufreq_power_cooling_register(const struct cpumask *clip_gpus, - u32 capacitance, get_static_t plat_static_func) + u32 capacitance) { return NULL; } @@ -110,8 +105,7 @@ of_gpufreq_cooling_register(struct device_node *np, static inline struct thermal_cooling_device * of_gpufreq_power_cooling_register(struct device_node *np, const struct cpumask *clip_gpus, - u32 capacitance, - get_static_t plat_static_func) + u32 capacitance) { return NULL; } -- 2.20.1