public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Giacomo Catenazzi <cate@cateee.net>
To: "Emilio López" <emilio@elopez.com.ar>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] drivers/clk/sunxi/clk-sunxi.c: small improvement of code
Date: Fri, 17 May 2013 09:02:45 +0200	[thread overview]
Message-ID: <5195D615.70608@cateee.net> (raw)

Hello Emilio,

please apply the following patch: "cpu_data" is defined in a header files of architectures.
In some architecture, the #define cpu_data is not a "macro-function", so the compiler will substitute the identifier with probably something wrong.


--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -239,7 +239,7 @@ struct mux_data {
        u8 shift;
 };

-static const __initconst struct mux_data cpu_data = {
+static const __initconst struct mux_data this_cpu_data = {
        .shift = 16,
 };

@@ -421,7 +421,7 @@ static const __initconst struct of_device_id clk_div_match[] = {

 /* Matches for mux clocks */
 static const __initconst struct of_device_id clk_mux_match[] = {
-       {.compatible = "allwinner,sun4i-cpu-clk", .data = &cpu_data,},
+       {.compatible = "allwinner,sun4i-cpu-clk", .data = &this_cpu_data,},
        {.compatible = "allwinner,sun4i-apb1-mux-clk", .data = &apb1_mux_data,},
        {}
 };



Signed-off-by: Giacomo A. Catenazzi <cate@cateee.net>

ciao
	cate

             reply	other threads:[~2013-05-17  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17  7:02 Giacomo Catenazzi [this message]
2013-05-17 13:43 ` [PATCH] clk: sunxi: "cpu_data" is defined in header files of some architectures Emilio López
2013-05-29 22:48   ` Mike Turquette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5195D615.70608@cateee.net \
    --to=cate@cateee.net \
    --cc=emilio@elopez.com.ar \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox