Skip to contentSkip to conversation

ccs: Get static data version minor correctly

PATCH New Sakari Ailus 1 participant 1 message Dec 15, 2020

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 ccs: Get static data version minor correctly

Fix obtaining CCS static data version minor part correctly. Instead, the upper 8 bits were obtained from the major version number.

Fixes a6b396f410b1 ("media: ccs: Add CCS static data parser library")
---
 drivers/media/i2c/ccs/ccs-data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ccs/ccs-data.c +1 -1
index 59338a6704af..52c3534d2061 100644
@@ -151,7 +151,7 @@ static int ccs_data_parse_version(struct bin_container *bin,
 	vv->version_major = ((u16)v->static_data_version_major[0] << 8) +
 		v->static_data_version_major[1];
 	vv->version_minor = ((u16)v->static_data_version_minor[0] << 8) +
-		v->static_data_version_major[1];
+		v->static_data_version_minor[1];
 	vv->date_year =  ((u16)v->year[0] << 8) + v->year[1];
 	vv->date_month = v->month;
 	vv->date_day = v->day;
Signature · 1 line
2.29.2