]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lib-vsprintf-add-%pcnr-format-specifiers-for-clocks-fix
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 7 Apr 2015 23:44:55 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:55 +0000 (09:44 +1000)
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>
lib/vsprintf.c

index c30392b269c23d6d12f26e209746ec10e7ba5e86..3ab8c9cf3980dc0228d3c5a879da86cb88d67361 100644 (file)
@@ -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]) {