diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2014-09-04 05:32:12 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-09-26 03:23:49 -0400 |
commit | 970d9fbca95c2f5277a4f55c2fba9a8b615c38f7 (patch) | |
tree | a588151ffc75901d554c216d479fd79caeba6bd0 /drivers/mfd | |
parent | 8bdf87b400271ebc7fbf71e117c299d19a97ebb4 (diff) |
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/pcf50633-core.c | 5 |
1 files changed, 1 insertions, 4 deletions
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, | |||
106 | } else | 106 | } else |
107 | dump[n1] = pcf50633_reg_read(pcf, n + n1); | 107 | dump[n1] = pcf50633_reg_read(pcf, n + n1); |
108 | 108 | ||
109 | hex_dump_to_buffer(dump, sizeof(dump), 16, 1, buf1, 128, 0); | 109 | buf1 += sprintf(buf1, "%*ph\n", (int)sizeof(dump), dump); |
110 | buf1 += strlen(buf1); | ||
111 | *buf1++ = '\n'; | ||
112 | *buf1 = '\0'; | ||
113 | } | 110 | } |
114 | 111 | ||
115 | return buf1 - buf; | 112 | return buf1 - buf; |