summaryrefslogtreecommitdiff
path: root/drivers/iio/temperature/ltc2983.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/temperature/ltc2983.c')
-rw-r--r--drivers/iio/temperature/ltc2983.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
index ddf47023364b..d39c0d6b77f1 100644
--- a/drivers/iio/temperature/ltc2983.c
+++ b/drivers/iio/temperature/ltc2983.c
@@ -444,8 +444,10 @@ static struct ltc2983_custom_sensor *__ltc2983_custom_sensor_new(
else
temp = __convert_to_raw(temp, resolution);
} else {
- of_property_read_u32_index(np, propname, index,
- (u32 *)&temp);
+ u32 t32;
+
+ of_property_read_u32_index(np, propname, index, &t32);
+ temp = t32;
}
for (j = 0; j < n_size; j++)