summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-07-24 14:11:40 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-09-20 18:16:11 +0200
commit3c78ca018c6f73732550f9d9c43eae355e8e8c95 (patch)
treed4c66a6f5998290f4ac9b64177ac3edbaf9bdb4b
parent7ebb5fae2c3711d6298a06b78c368663298604e2 (diff)
tegra11_soctherm.c: fix compilation with gcc 7
With gcc 7 the following compile time error occurs: | arch/arm/mach-tegra/tegra11_soctherm.c:2978:40: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | s->sensor_enable = s->sensor_enable ?: therm->zone_enable; | ^ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--arch/arm/mach-tegra/tegra11_soctherm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra11_soctherm.c b/arch/arm/mach-tegra/tegra11_soctherm.c
index 5a2140234ec1..f1d24c278e74 100644
--- a/arch/arm/mach-tegra/tegra11_soctherm.c
+++ b/arch/arm/mach-tegra/tegra11_soctherm.c
@@ -2975,7 +2975,8 @@ static int soctherm_init_platform_data(void)
for (i = 0; i < TSENSE_SIZE; i++) {
therm = &plat_data.therm[tsensor2therm_map[i]];
s = &plat_data.sensor_data[i];
- s->sensor_enable = s->sensor_enable ?: therm->zone_enable;
+ if (!(s->sensor_enable))
+ s->sensor_enable = therm->zone_enable;
s->tall = s->tall ?: sensor_defaults.tall;
s->tiddq = s->tiddq ?: sensor_defaults.tiddq;
s->ten_count = s->ten_count ?: sensor_defaults.ten_count;