From 970d9fbca95c2f5277a4f55c2fba9a8b615c38f7 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 4 Sep 2014 12:32:12 +0300 Subject: mfd: pcf50633: Use sprintf directly When dump a content of the registers let's use snprintf() directly with %*ph specifier. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones --- drivers/mfd/pcf50633-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/mfd/pcf50633-core.c') diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index e15c060d2dc7..43664eb69c93 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c @@ -106,10 +106,7 @@ static ssize_t show_dump_regs(struct device *dev, struct device_attribute *attr, } else dump[n1] = pcf50633_reg_read(pcf, n + n1); - hex_dump_to_buffer(dump, sizeof(dump), 16, 1, buf1, 128, 0); - buf1 += strlen(buf1); - *buf1++ = '\n'; - *buf1 = '\0'; + buf1 += sprintf(buf1, "%*ph\n", (int)sizeof(dump), dump); } return buf1 - buf; -- cgit v1.2.3