summaryrefslogtreecommitdiff
path: root/drivers/power/supply/twl4030_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/supply/twl4030_charger.c')
-rw-r--r--drivers/power/supply/twl4030_charger.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index 1bc49b2e12e8..53a0ea5a61da 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -726,11 +726,9 @@ twl4030_bci_mode_show(struct device *dev,
for (i = 0; i < ARRAY_SIZE(modes); i++)
if (mode == i)
- len += scnprintf(buf+len, PAGE_SIZE-len,
- "[%s] ", modes[i]);
+ len += sysfs_emit_at(buf, len, "[%s] ", modes[i]);
else
- len += scnprintf(buf+len, PAGE_SIZE-len,
- "%s ", modes[i]);
+ len += sysfs_emit_at(buf, len, "%s ", modes[i]);
buf[len-1] = '\n';
return len;
}