Skip to content

Commit cea56b0

Browse files
XenuIsWatchingmbolivar-ampere
authored andcommitted
drivers: sensor: icp10125 fix double-promotion warnings
sensor_value_from_double was used, but sensor_value_from_float should be used as the parameter is a float Signed-off-by: Ryan McClelland <[email protected]>
1 parent 37da312 commit cea56b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sensor/icp10125/icp10125.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,13 @@ static int icp10125_sample_fetch(const struct device *dev, const enum sensor_cha
265265

266266
static void icp10125_convert_press_value(struct icp10125_data *data, struct sensor_value *val)
267267
{
268-
sensor_value_from_double(val, icp10125_calc_calibrated_press(data) / 1000.f);
268+
sensor_value_from_float(val, icp10125_calc_calibrated_press(data) / 1000.f);
269269
}
270270

271271
static void icp10125_convert_ambient_temp_value(struct icp10125_data *data,
272272
struct sensor_value *val)
273273
{
274-
sensor_value_from_double(val, icp10125_calc_calibrated_ambient_temp(data));
274+
sensor_value_from_float(val, icp10125_calc_calibrated_ambient_temp(data));
275275
}
276276

277277
static int icp10125_channel_get(const struct device *dev, enum sensor_channel chan,

0 commit comments

Comments
 (0)