File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,6 @@ static int tmp11x_attr_set(const struct device *dev,
350
350
const struct tmp11x_dev_config * cfg = dev -> config ;
351
351
struct tmp11x_data * drv_data = dev -> data ;
352
352
int16_t value ;
353
- uint16_t avg ;
354
353
int res = 0 ;
355
354
bool store ;
356
355
int store_res = 0 ;
@@ -394,19 +393,19 @@ static int tmp11x_attr_set(const struct device *dev,
394
393
/* sensor supports averaging 1, 8, 32 and 64 samples */
395
394
switch (val -> val1 ) {
396
395
case 1 :
397
- avg = TMP11X_AVG_1_SAMPLE ;
396
+ value = TMP11X_AVG_1_SAMPLE ;
398
397
break ;
399
398
400
399
case 8 :
401
- avg = TMP11X_AVG_8_SAMPLES ;
400
+ value = TMP11X_AVG_8_SAMPLES ;
402
401
break ;
403
402
404
403
case 32 :
405
- avg = TMP11X_AVG_32_SAMPLES ;
404
+ value = TMP11X_AVG_32_SAMPLES ;
406
405
break ;
407
406
408
407
case 64 :
409
- avg = TMP11X_AVG_64_SAMPLES ;
408
+ value = TMP11X_AVG_64_SAMPLES ;
410
409
break ;
411
410
412
411
default :
@@ -415,7 +414,7 @@ static int tmp11x_attr_set(const struct device *dev,
415
414
}
416
415
417
416
if (res == 0 ) {
418
- res = tmp11x_write_config (dev , TMP11X_CFGR_AVG , avg );
417
+ res = tmp11x_write_config (dev , TMP11X_CFGR_AVG , value );
419
418
}
420
419
421
420
break ;
You can’t perform that action at this time.
0 commit comments