From 3c78ca018c6f73732550f9d9c43eae355e8e8c95 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 24 Jul 2017 14:11:40 +0200 Subject: 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 Acked-by: Marcel Ziswiler --- arch/arm/mach-tegra/tegra11_soctherm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch') 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; -- cgit v1.2.3