projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bdf87b
)
mfd: pcf50633: Use sprintf directly
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Thu, 4 Sep 2014 09:32:12 +0000
(12:32 +0300)
committer
Lee Jones
<lee.jones@linaro.org>
Fri, 26 Sep 2014 07:23:49 +0000
(08:23 +0100)
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>
drivers/mfd/pcf50633-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/pcf50633-core.c
b/drivers/mfd/pcf50633-core.c
index e15c060d2dc7a9fc3346a053679d8fcf89f053fb..43664eb69c93f519dd72763799d7bee2dd6b4126 100644
(file)
--- 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;