* [PATCH 1/3] thermal/drivers/qcom: Remove get_trend function
@ 2022-06-16 20:25 Daniel Lezcano
2022-06-17 12:58 ` Amit Kucheria
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2022-06-16 20:25 UTC (permalink / raw)
To: daniel.lezcano, rafael
Cc: linux-kernel, linux-pm, Amit Kucheria, Thara Gopinath, Andy Gross,
Bjorn Andersson, Zhang Rui,
open list:QUALCOMM TSENS THERMAL DRIVER
There is a get_trend function which is a wrapper to call a private
get_trend function. However, this private get_trend function is not
assigned anywhere.
Remove this dead code.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/thermal/qcom/tsens.c | 12 ------------
drivers/thermal/qcom/tsens.h | 2 --
2 files changed, 14 deletions(-)
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 7963ee33bf75..e49f58e83513 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -933,17 +933,6 @@ static int tsens_get_temp(void *data, int *temp)
return priv->ops->get_temp(s, temp);
}
-static int tsens_get_trend(void *data, int trip, enum thermal_trend *trend)
-{
- struct tsens_sensor *s = data;
- struct tsens_priv *priv = s->priv;
-
- if (priv->ops->get_trend)
- return priv->ops->get_trend(s, trend);
-
- return -ENOTSUPP;
-}
-
static int __maybe_unused tsens_suspend(struct device *dev)
{
struct tsens_priv *priv = dev_get_drvdata(dev);
@@ -1004,7 +993,6 @@ MODULE_DEVICE_TABLE(of, tsens_table);
static const struct thermal_zone_of_device_ops tsens_of_ops = {
.get_temp = tsens_get_temp,
- .get_trend = tsens_get_trend,
.set_trips = tsens_set_trips,
};
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index 1471a2c00f15..ba05c8233356 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -65,7 +65,6 @@ struct tsens_sensor {
* @disable: Function to disable the tsens device
* @suspend: Function to suspend the tsens device
* @resume: Function to resume the tsens device
- * @get_trend: Function to get the thermal/temp trend
*/
struct tsens_ops {
/* mandatory callbacks */
@@ -77,7 +76,6 @@ struct tsens_ops {
void (*disable)(struct tsens_priv *priv);
int (*suspend)(struct tsens_priv *priv);
int (*resume)(struct tsens_priv *priv);
- int (*get_trend)(struct tsens_sensor *s, enum thermal_trend *trend);
};
#define REG_FIELD_FOR_EACH_SENSOR11(_name, _offset, _startbit, _stopbit) \
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/3] thermal/drivers/qcom: Remove get_trend function
2022-06-16 20:25 [PATCH 1/3] thermal/drivers/qcom: Remove get_trend function Daniel Lezcano
@ 2022-06-17 12:58 ` Amit Kucheria
0 siblings, 0 replies; 2+ messages in thread
From: Amit Kucheria @ 2022-06-17 12:58 UTC (permalink / raw)
To: Daniel Lezcano
Cc: Rafael J. Wysocki, LKML, Linux PM list, Thara Gopinath,
Andy Gross, Bjorn Andersson, Zhang Rui,
open list:QUALCOMM TSENS THERMAL DRIVER
On Fri, Jun 17, 2022 at 1:56 AM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> There is a get_trend function which is a wrapper to call a private
> get_trend function. However, this private get_trend function is not
> assigned anywhere.
>
> Remove this dead code.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Amit Kucheria <amitk@kernel.org>
> ---
> drivers/thermal/qcom/tsens.c | 12 ------------
> drivers/thermal/qcom/tsens.h | 2 --
> 2 files changed, 14 deletions(-)
>
> diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
> index 7963ee33bf75..e49f58e83513 100644
> --- a/drivers/thermal/qcom/tsens.c
> +++ b/drivers/thermal/qcom/tsens.c
> @@ -933,17 +933,6 @@ static int tsens_get_temp(void *data, int *temp)
> return priv->ops->get_temp(s, temp);
> }
>
> -static int tsens_get_trend(void *data, int trip, enum thermal_trend *trend)
> -{
> - struct tsens_sensor *s = data;
> - struct tsens_priv *priv = s->priv;
> -
> - if (priv->ops->get_trend)
> - return priv->ops->get_trend(s, trend);
> -
> - return -ENOTSUPP;
> -}
> -
> static int __maybe_unused tsens_suspend(struct device *dev)
> {
> struct tsens_priv *priv = dev_get_drvdata(dev);
> @@ -1004,7 +993,6 @@ MODULE_DEVICE_TABLE(of, tsens_table);
>
> static const struct thermal_zone_of_device_ops tsens_of_ops = {
> .get_temp = tsens_get_temp,
> - .get_trend = tsens_get_trend,
> .set_trips = tsens_set_trips,
> };
>
> diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
> index 1471a2c00f15..ba05c8233356 100644
> --- a/drivers/thermal/qcom/tsens.h
> +++ b/drivers/thermal/qcom/tsens.h
> @@ -65,7 +65,6 @@ struct tsens_sensor {
> * @disable: Function to disable the tsens device
> * @suspend: Function to suspend the tsens device
> * @resume: Function to resume the tsens device
> - * @get_trend: Function to get the thermal/temp trend
> */
> struct tsens_ops {
> /* mandatory callbacks */
> @@ -77,7 +76,6 @@ struct tsens_ops {
> void (*disable)(struct tsens_priv *priv);
> int (*suspend)(struct tsens_priv *priv);
> int (*resume)(struct tsens_priv *priv);
> - int (*get_trend)(struct tsens_sensor *s, enum thermal_trend *trend);
> };
>
> #define REG_FIELD_FOR_EACH_SENSOR11(_name, _offset, _startbit, _stopbit) \
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-17 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-16 20:25 [PATCH 1/3] thermal/drivers/qcom: Remove get_trend function Daniel Lezcano
2022-06-17 12:58 ` Amit Kucheria
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox