aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-07-31 13:11:05 -0400
committerEduardo Valentin <edubezval@gmail.com>2014-11-02 22:02:48 -0500
commit9c7a87f146a642447db29327bcedfbe2163da172 (patch)
treeb86df2996b242657289a880a414e5c13c979d78b /drivers/thermal
parentac951af51f417f71bb6830a5d8018755f55715f4 (diff)
thermal: exynos: remove redundant pdata checks from exynos_tmu_control()
pdata->reference_voltage and pdata->gain are always defined to non-zero values so remove the redundant checks from exynos_tmu_control(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c12
-rw-r--r--drivers/thermal/samsung/exynos_tmu.h4
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 6bc8a2019613..122ae663d0a8 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -274,15 +274,11 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
274 if (pdata->test_mux) 274 if (pdata->test_mux)
275 con |= (pdata->test_mux << reg->test_mux_addr_shift); 275 con |= (pdata->test_mux << reg->test_mux_addr_shift);
276 276
277 if (pdata->reference_voltage) { 277 con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
278 con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift); 278 con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
279 con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
280 }
281 279
282 if (pdata->gain) { 280 con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift);
283 con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift); 281 con |= (pdata->gain << reg->buf_slope_sel_shift);
284 con |= (pdata->gain << reg->buf_slope_sel_shift);
285 }
286 282
287 if (pdata->noise_cancel_mode) { 283 if (pdata->noise_cancel_mode) {
288 con &= ~(reg->therm_trip_mode_mask << 284 con &= ~(reg->therm_trip_mode_mask <<
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 5514d689624b..327c64f0721f 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -201,10 +201,10 @@ struct exynos_tmu_registers {
201 * @max_trigger_level: max trigger level supported by the TMU 201 * @max_trigger_level: max trigger level supported by the TMU
202 * @non_hw_trigger_levels: number of defined non-hardware trigger levels 202 * @non_hw_trigger_levels: number of defined non-hardware trigger levels
203 * @gain: gain of amplifier in the positive-TC generator block 203 * @gain: gain of amplifier in the positive-TC generator block
204 * 0 <= gain <= 15 204 * 0 < gain <= 15
205 * @reference_voltage: reference voltage of amplifier 205 * @reference_voltage: reference voltage of amplifier
206 * in the positive-TC generator block 206 * in the positive-TC generator block
207 * 0 <= reference_voltage <= 31 207 * 0 < reference_voltage <= 31
208 * @noise_cancel_mode: noise cancellation mode 208 * @noise_cancel_mode: noise cancellation mode
209 * 000, 100, 101, 110 and 111 can be different modes 209 * 000, 100, 101, 110 and 111 can be different modes
210 * @type: determines the type of SOC 210 * @type: determines the type of SOC