Power: remove "\n" about mmi_discrete showing factory test node

"\n" is invalid char for
test case.

Change-Id: If15673f6a229ab9f56ae3c97fa676ef8c90a2695
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2130777
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
liuyc20 2021-11-30 16:10:10 +08:00 • committed by Yuecai Liu
commit 0df380501b

View file

@ -76,7 +76,7 @@ static ssize_t force_chg_usb_suspend_show(struct device *dev,
state = mmi_discrete_is_usb_suspended(mmi_chip);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d\n", state);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d", state);
}
static DEVICE_ATTR(force_chg_usb_suspend, 0664,
@ -136,7 +136,7 @@ static ssize_t force_chg_auto_enable_show(struct device *dev,
}
state = value;
end:
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d\n", state);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d", state);
}
static DEVICE_ATTR(force_chg_auto_enable, 0664,
@ -195,7 +195,7 @@ static ssize_t force_chg_ibatt_show(struct device *dev,
state /= 1000; /* Convert to mA */
end:
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%ul\n", state);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%ul", state);
}
static DEVICE_ATTR(force_chg_ibatt, 0664,
@ -250,7 +250,7 @@ static ssize_t force_chg_iusb_show(struct device *dev,
}
usb_curr /= 1000; /* Convert to mA */
end:
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d\n", usb_curr);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d", usb_curr);
}
static DEVICE_ATTR(force_chg_iusb, 0664,
@ -285,7 +285,7 @@ static ssize_t chg_type_show(struct device *dev,
else
charger_type = 1; // 1 is SDP in mkt platform
end:
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d\n", charger_type);
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "%d", charger_type);
}
static DEVICE_ATTR(chg_type, 0664,
@ -317,7 +317,7 @@ static ssize_t force_chg_fail_clear_show(struct device *dev,
char *buf)
{
/* do nothing for mmi_discrete_charger */
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "0\n");
return scnprintf(buf, CHG_SHOW_MAX_SIZE, "0");
}
static DEVICE_ATTR(force_chg_fail_clear, 0664,