summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2015-03-25 13:02:48 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2015-03-25 13:02:48 +1100
commitb278fa312e3b778b961ca21901fa5b14953aadc6 (patch)
tree69b6e9bc3435651cf63abc7a3bcb8ad4f0ebff56 /lib
parenta00fa963c49f623b8bd33c0f38dded7867a40b37 (diff)
lib-vsprintf-add-%pcnr-format-specifiers-for-clocks-fix
omit code if !CONFIG_HAVE_CLK Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Mike Turquette <mturquette@linaro.org> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vsprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index c30392b269c2..3ab8c9cf3980 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1320,7 +1320,7 @@ static noinline_for_stack
char *clock(char *buf, char *end, struct clk *clk, struct printf_spec spec,
const char *fmt)
{
- if (!clk)
+ if (!IS_ENABLED(CONFIG_HAVE_CLK) || !clk)
return string(buf, end, NULL, spec);
switch (fmt[1]) {