thermal: exynos: remove redundant pdata checks from exynos_tmu_control()
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 31 Jul 2014 17:11:05 +0000 (19:11 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 3 Nov 2014 03:02:48 +0000 (23:02 -0400)
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>
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/samsung/exynos_tmu.h

index 6bc8a201961322d2081966a3dd31cff8886a8e68..122ae663d0a8bcba287ee2a03dfe6db3f361d5f0 100644 (file)
@@ -274,15 +274,11 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
        if (pdata->test_mux)
                con |= (pdata->test_mux << reg->test_mux_addr_shift);
 
-       if (pdata->reference_voltage) {
-               con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
-               con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
-       }
+       con &= ~(reg->buf_vref_sel_mask << reg->buf_vref_sel_shift);
+       con |= pdata->reference_voltage << reg->buf_vref_sel_shift;
 
-       if (pdata->gain) {
-               con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift);
-               con |= (pdata->gain << reg->buf_slope_sel_shift);
-       }
+       con &= ~(reg->buf_slope_sel_mask << reg->buf_slope_sel_shift);
+       con |= (pdata->gain << reg->buf_slope_sel_shift);
 
        if (pdata->noise_cancel_mode) {
                con &= ~(reg->therm_trip_mode_mask <<
index 5514d689624b49b1595ac2a5db1c4149c0132dbb..327c64f0721fb85212850c24ea6b52485f27c862 100644 (file)
@@ -201,10 +201,10 @@ struct exynos_tmu_registers {
  * @max_trigger_level: max trigger level supported by the TMU
  * @non_hw_trigger_levels: number of defined non-hardware trigger levels
  * @gain: gain of amplifier in the positive-TC generator block
- *     0 <= gain <= 15
+ *     0 < gain <= 15
  * @reference_voltage: reference voltage of amplifier
  *     in the positive-TC generator block
- *     0 <= reference_voltage <= 31
+ *     0 < reference_voltage <= 31
  * @noise_cancel_mode: noise cancellation mode
  *     000, 100, 101, 110 and 111 can be different modes
  * @type: determines the type of SOC