drivers: sensors: tmp112 fix config register updating
The function that sets the driver's state of the sensor's config register has a bug. This commit fixes that. Signed-off-by: Pete Dietl <petedietl@gmail.com>
This commit is contained in:
parent
9b99ab6896
commit
2b62282d46
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ static int tmp112_update_config(const struct device *dev, uint16_t mask,
|
|||
|
||||
rc = tmp112_reg_write(dev->config, TMP112_REG_CONFIG, new_val);
|
||||
if (rc == 0) {
|
||||
data->config_reg = val;
|
||||
data->config_reg = new_val;
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue