Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions drivers/power/supply/qcom_battmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,11 +1237,11 @@ static void qcom_battmgr_sc8280xp_strcpy(char *dest, const char *src)

static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry)
{
if ((!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) ||
(!strncmp(chemistry, "OOI", BATTMGR_CHEMISTRY_LEN)))
if ((!strncmp(chemistry, "LIO", 3)) ||
(!strncmp(chemistry, "OOI", 3)))
return POWER_SUPPLY_TECHNOLOGY_LION;
if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN) ||
!strncmp(chemistry, "LiP", BATTMGR_CHEMISTRY_LEN))
if (!strncmp(chemistry, "LIP", 3) ||
!strncmp(chemistry, "LiP", 3))
return POWER_SUPPLY_TECHNOLOGY_LIPO;

pr_err("Unknown battery technology '%s'\n", chemistry);
Expand Down
Loading