From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH][RFC] ARM: shmobile: lager: move res/data into init function
Date: Thu, 10 Apr 2014 19:24:03 +0000 [thread overview]
Message-ID: <CAMuHMdXM6B3PutmvZoGF7iZmjjNaQ3K=2BaLV3MANfaDB34ALA@mail.gmail.com> (raw)
In-Reply-To: <87txa4thq0.wl%kuninori.morimoto.gx@gmail.com>
Hi Morimoto-san,
On Tue, Apr 8, 2014 at 9:15 AM, Kuninori Morimoto
<kuninori.morimoto.gx@gmail.com> wrote:
> +++ b/arch/arm/mach-shmobile/board-lager.c
> @@ -116,17 +116,17 @@ static const struct rcar_du_platform_data lager_du_pdata __initconst = {
> .num_encoders = ARRAY_SIZE(lager_du_encoders),
> };
>
> -static const struct resource du_resources[] __initconst = {
> - DEFINE_RES_MEM(0xfeb00000, 0x70000),
> - DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
> - DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
> - DEFINE_RES_IRQ(gic_spi(256)),
> - DEFINE_RES_IRQ(gic_spi(268)),
> - DEFINE_RES_IRQ(gic_spi(269)),
> -};
> -
> static void __init lager_add_du_device(void)
> {
> + struct resource du_resources[] = {
> + DEFINE_RES_MEM(0xfeb00000, 0x70000),
> + DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
> + DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
> + DEFINE_RES_IRQ(gic_spi(256)),
> + DEFINE_RES_IRQ(gic_spi(268)),
> + DEFINE_RES_IRQ(gic_spi(269)),
> + };
Shouldn't the above retain the "static const"?
Without the static, there will be additonal code to perform the initialization
on the stack.
> +
> struct platform_device_info info = {
> .name = "rcar-du-r8a7790",
> .id = -1,
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2014-04-10 19:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 7:15 [PATCH][RFC] ARM: shmobile: lager: move res/data into init function Kuninori Morimoto
2014-04-10 19:24 ` Geert Uytterhoeven [this message]
2014-04-10 23:07 ` Simon Horman
2014-04-11 0:39 ` Kuninori Morimoto
2014-04-11 0:42 ` Kuninori Morimoto
2014-04-11 9:00 ` Geert Uytterhoeven
2014-04-11 12:23 ` Sergei Shtylyov
2014-04-14 0:12 ` Kuninori Morimoto
2014-04-14 2:05 ` Simon Horman
2014-04-14 2:08 ` Kuninori Morimoto
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='CAMuHMdXM6B3PutmvZoGF7iZmjjNaQ3K=2BaLV3MANfaDB34ALA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=linux-sh@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;
as well as URLs for NNTP newsgroup(s).