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>
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;