Skip to content

Commit

Permalink
lib/vsprintf: Reinstate printing of legacy clock IDs
Browse files Browse the repository at this point in the history
When using the legacy clock framework, clock pointers are no longer
printed as IDs, as the !CONFIG_COMMON_CLK case was accidentally
considered an error case.

Fix this by reverting to the old behavior, which allows to distinguish
clocks by ID, as the legacy clock framework does not store names with
clocks.

Fixes: 0b74d4d ("vsprintf: Consolidate handling of unknown pointer specifiers")
Link: http://lkml.kernel.org/r/[email protected]
Cc: Sergey Senozhatsky <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: [email protected]
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
  • Loading branch information
geertu authored and pmladek committed Jul 4, 2019
1 parent b314dd4 commit 4ca96aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
#ifdef CONFIG_COMMON_CLK
return string(buf, end, __clk_get_name(clk), spec);
#else
return error_string(buf, end, "(%pC?)", spec);
return ptr_to_id(buf, end, clk, spec);
#endif
}
}
Expand Down

0 comments on commit 4ca96aa

Please sign in to comment.