aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2020-01-12 18:09:25 +0000
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-01-27 11:41:08 +0100
commit291292cddccaca99f48b4701121bcb1870e4f7ce (patch)
treebf6e68ca26181a5f661f87dbf7102902d67296e8 /drivers/thermal
parentthermal: sun8i: Fix using plain integer as NULL pointer in sun8i_ths_resource_init (diff)
downloadlinux-dev-291292cddccaca99f48b4701121bcb1870e4f7ce.tar.xz
linux-dev-291292cddccaca99f48b4701121bcb1870e4f7ce.zip
thermal: sun8i: Remove unused variable and unneeded macros
The cp_ft_flag variable is not used after initialization, so delete it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and THS_CALIBRATION_IN_FT are not needed, so delete them. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200112180925.23705-1-tiny.windzz@gmail.com
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/sun8i_thermal.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 4bcde9491edb..bd7549f9ecba 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -54,9 +54,6 @@
#define SUN50I_H6_THS_DATA_IRQ_STS(x) BIT(x)
/* millidegree celsius */
-#define THS_EFUSE_CP_FT_MASK 0x3000
-#define THS_EFUSE_CP_FT_BIT 12
-#define THS_CALIBRATION_IN_FT 1
struct tsensor {
struct ths_device *tmdev;
@@ -88,7 +85,6 @@ struct ths_device {
struct clk *bus_clk;
struct clk *mod_clk;
struct tsensor sensor[MAX_SENSOR_NUM];
- u32 cp_ft_flag;
};
/* Temp Unit: millidegree Celsius */
@@ -244,8 +240,6 @@ static int sun50i_h6_ths_calibrate(struct ths_device *tmdev,
* register values and this will become a calibration offset.
*/
ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
- tmdev->cp_ft_flag = (caldata[0] & THS_EFUSE_CP_FT_MASK)
- >> THS_EFUSE_CP_FT_BIT;
for (i = 0; i < tmdev->chip->sensor_num; i++) {
int sensor_reg = caldata[i + 1];