tegra124: actually parse is_lvds

Precedence rules make the compiler optimize
const | var ? val1 : val2; into val1. In our case this
means not writing 2 << NV_SOR_CSTM_ROTCLK_SHIFT to the
register and not caring about the content of is_lvds.

Change-Id: I0b02c74f9445f51bfab9eeae2e8eb9480d104708
Found-by: Coverity Scan
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: http://review.coreboot.org/7501
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
This commit is contained in:
Patrick Georgi 2014-11-17 09:27:08 +01:00 committed by Patrick Georgi
parent 04f68c1cf1
commit 68e4cbd9d6
1 changed files with 2 additions and 2 deletions

View File

@ -556,8 +556,8 @@ static void tegra_dc_sor_config_panel(struct tegra_dc_sor_data *sor,
NV_SOR_CSTM_ROTCLK_DEFAULT_MASK | NV_SOR_CSTM_ROTCLK_DEFAULT_MASK |
NV_SOR_CSTM_LVDS_EN_ENABLE, NV_SOR_CSTM_LVDS_EN_ENABLE,
2 << NV_SOR_CSTM_ROTCLK_SHIFT | 2 << NV_SOR_CSTM_ROTCLK_SHIFT |
is_lvds ? NV_SOR_CSTM_LVDS_EN_ENABLE : (is_lvds ? NV_SOR_CSTM_LVDS_EN_ENABLE :
NV_SOR_CSTM_LVDS_EN_DISABLE); NV_SOR_CSTM_LVDS_EN_DISABLE));
} }
static void tegra_dc_sor_enable_dc(struct tegra_dc_sor_data *sor) static void tegra_dc_sor_enable_dc(struct tegra_dc_sor_data *sor)