Skip to content

Commit

Permalink
mfd: pcf50633: Use sprintf directly
Browse files Browse the repository at this point in the history
When dump a content of the registers let's use snprintf() directly with %*ph
specifier.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
andy-shev authored and Lee Jones committed Sep 26, 2014
1 parent 8bdf87b commit 970d9fb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/mfd/pcf50633-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 970d9fb

Please sign in to comment.