From d01780fc9403166d250ded3d02372a7e1a9db4fd Mon Sep 17 00:00:00 2001 From: Peter Rowley Date: Fri, 19 May 2023 14:05:49 -0700 Subject: [PATCH] drivers: fuel_gauge: sbs_gauge: Fix copy/paste error in RTTF Looks like a copy/paste error when copying runtime to empty to runtime to full. Fixing so that we're assigning to the right union member. Signed-off-by: Peter Rowley --- drivers/fuel_gauge/sbs_gauge/sbs_gauge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fuel_gauge/sbs_gauge/sbs_gauge.c b/drivers/fuel_gauge/sbs_gauge/sbs_gauge.c index f291cdd798e..f1d107330cb 100644 --- a/drivers/fuel_gauge/sbs_gauge/sbs_gauge.c +++ b/drivers/fuel_gauge/sbs_gauge/sbs_gauge.c @@ -94,7 +94,7 @@ static int sbs_gauge_get_prop(const struct device *dev, struct fuel_gauge_get_pr break; case FUEL_GAUGE_RUNTIME_TO_FULL: rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_AVG_TIME2FULL, &val); - prop->value.runtime_to_empty = val; + prop->value.runtime_to_full = val; break; case FUEL_GAUGE_SBS_MFR_ACCESS: rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_MANUFACTURER_ACCESS, &val);