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>
This commit is contained in:
parent
ac951af51f
commit
9c7a87f146
|
@ -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 <<
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue