summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/samsung/exynos_tmu.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2014-07-31 19:11:05 +0200
committerEduardo Valentin <edubezval@gmail.com>2014-11-02 23:02:48 -0400
commit9c7a87f146a642447db29327bcedfbe2163da172 (patch)
treeb86df2996b242657289a880a414e5c13c979d78b /drivers/thermal/samsung/exynos_tmu.c
parentac951af51f417f71bb6830a5d8018755f55715f4 (diff)
downloadlinux-9c7a87f146a642447db29327bcedfbe2163da172.tar.gz
linux-9c7a87f146a642447db29327bcedfbe2163da172.tar.bz2
linux-9c7a87f146a642447db29327bcedfbe2163da172.zip
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/samsung/exynos_tmu.c')
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c12
1 files changed, 4 insertions, 8 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)
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 <<