@@ -5,7 +5,7 @@
#include <linux/clk-provider.h>
#include <linux/device.h>
-#include <linux/seq_buf.h>
+#include <linux/printbuf.h>
#include <linux/slab.h>
#include <soc/tegra/bpmp.h>
@@ -365,39 +365,38 @@ static void tegra_bpmp_clk_info_dump(struct tegra_bpmp *bpmp,
const struct tegra_bpmp_clk_info *info)
{
const char *prefix = "";
- struct seq_buf buf;
+ struct printbuf buf = PRINTBUF;
unsigned int i;
- char flags[64];
-
- seq_buf_init(&buf, flags, sizeof(flags));
if (info->flags)
- seq_buf_printf(&buf, "(");
+ prt_printf(&buf, "(");
if (info->flags & TEGRA_BPMP_CLK_HAS_MUX) {
- seq_buf_printf(&buf, "%smux", prefix);
+ prt_printf(&buf, "%smux", prefix);
prefix = ", ";
}
if ((info->flags & TEGRA_BPMP_CLK_HAS_SET_RATE) == 0) {
- seq_buf_printf(&buf, "%sfixed", prefix);
+ prt_printf(&buf, "%sfixed", prefix);
prefix = ", ";
}
if (info->flags & TEGRA_BPMP_CLK_IS_ROOT) {
- seq_buf_printf(&buf, "%sroot", prefix);
+ prt_printf(&buf, "%sroot", prefix);
prefix = ", ";
}
if (info->flags)
- seq_buf_printf(&buf, ")");
+ prt_printf(&buf, ")");
dev_printk(level, bpmp->dev, "%03u: %s\n", info->id, info->name);
- dev_printk(level, bpmp->dev, " flags: %lx %s\n", info->flags, flags);
+ dev_printk(level, bpmp->dev, " flags: %lx %s\n", info->flags, printbuf_str(&buf));
dev_printk(level, bpmp->dev, " parents: %u\n", info->num_parents);
for (i = 0; i < info->num_parents; i++)
dev_printk(level, bpmp->dev, " %03u\n", info->parents[i]);
+
+ printbuf_exit(&buf);
}
static int tegra_bpmp_probe_clocks(struct tegra_bpmp *bpmp,