|
20 | 20 | #include <linux/interrupt.h>
|
21 | 21 | #include <linux/io.h>
|
22 | 22 | #include <linux/module.h>
|
23 |
| -#include <linux/mutex.h> |
24 | 23 | #include <linux/of_device.h>
|
25 | 24 | #include <linux/platform_device.h>
|
26 | 25 | #include <linux/pm_runtime.h>
|
@@ -72,7 +71,6 @@ struct rcar_gen3_thermal_tsc {
|
72 | 71 | void __iomem *base;
|
73 | 72 | struct thermal_zone_device *zone;
|
74 | 73 | struct equation_coefs coef;
|
75 |
| - struct mutex lock; |
76 | 74 | };
|
77 | 75 |
|
78 | 76 | struct rcar_gen3_thermal_priv {
|
@@ -163,16 +161,12 @@ static int rcar_gen3_thermal_get_temp(void *devdata, int *temp)
|
163 | 161 | u32 reg;
|
164 | 162 |
|
165 | 163 | /* Read register and convert to mili Celsius */
|
166 |
| - mutex_lock(&tsc->lock); |
167 |
| - |
168 | 164 | reg = rcar_gen3_thermal_read(tsc, REG_GEN3_TEMP) & CTEMP_MASK;
|
169 | 165 |
|
170 | 166 | val1 = FIXPT_DIV(FIXPT_INT(reg) - tsc->coef.b1, tsc->coef.a1);
|
171 | 167 | val2 = FIXPT_DIV(FIXPT_INT(reg) - tsc->coef.b2, tsc->coef.a2);
|
172 | 168 | mcelsius = FIXPT_TO_MCELSIUS((val1 + val2) / 2);
|
173 | 169 |
|
174 |
| - mutex_unlock(&tsc->lock); |
175 |
| - |
176 | 170 | /* Make sure we are inside specifications */
|
177 | 171 | if ((mcelsius < MCELSIUS(-40)) || (mcelsius > MCELSIUS(125)))
|
178 | 172 | return -EIO;
|
@@ -299,7 +293,6 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
|
299 | 293 | }
|
300 | 294 |
|
301 | 295 | priv->tscs[i] = tsc;
|
302 |
| - mutex_init(&tsc->lock); |
303 | 296 |
|
304 | 297 | match_data->thermal_init(tsc);
|
305 | 298 | rcar_gen3_thermal_calc_coefs(&tsc->coef, ptat, thcode[i]);
|
|
0 commit comments