From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 3/4] sh: clock-sh7724: all div6_clks use SH_CLK_DIV6_EXT()
Date: Tue, 06 Dec 2011 05:51:15 +0000 [thread overview]
Message-ID: <20111206055115.GG30055@linux-sh.org> (raw)
In-Reply-To: <8739cz8rfx.wl%kuninori.morimoto.gx@renesas.com>
On Mon, Dec 05, 2011 at 09:47:17PM -0800, Kuninori Morimoto wrote:
> > On Sun, Dec 04, 2011 at 10:26:30PM -0800, Kuninori Morimoto wrote:
> > > -static struct clk div6_clks[DIV6_NR] = {
> > > - [DIV6_V] = SH_CLK_DIV6(&div3_clk, VCLKCR, 0),
> > > - [DIV6_I] = SH_CLK_DIV6(&div3_clk, IRDACLKCR, 0),
> > > - [DIV6_S] = SH_CLK_DIV6(&div3_clk, SPUCLKCR, CLK_ENABLE_ON_INIT),
> > > +/* Indices are important - they are the actual src selecting values */
> > > +static struct clk *common_parent[] = {
> > > + [0] = &div3_clk,
> > > + [1] = NULL,
> > > };
> > >
> > > -enum { DIV6_FA, DIV6_FB, DIV6_REPARENT_NR };
> > > +static struct clk *vclkcr_parent[] = {
> > > + [0] = &div3_clk,
> > > + [1] = NULL,
> > > + [2] = &sh7724_dv_clki,
> > > + [3] = NULL,
> > > + [4] = &extal_clk,
> > > + [5] = NULL,
> > > + [6] = NULL,
> > > + [7] = NULL,
> > > +};
> > >
> > You don't really need any of these NULL initializers, they can all be
> > dropped.
>
> Hmm...
> Then, I can not use ARRAY_SIZE(vclkcr_parent) ?
>
You can just initialize the array size. There's nothing wrong with having
a vclkcr_parent[8] or some _NR define to that extent as part of the
initializer, even if you're just partially initializing the elements.
prev parent reply other threads:[~2011-12-06 5:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 6:26 [PATCH 3/4] sh: clock-sh7724: all div6_clks use SH_CLK_DIV6_EXT() Kuninori Morimoto
2011-12-06 5:25 ` Paul Mundt
2011-12-06 5:47 ` Kuninori Morimoto
2011-12-06 5:51 ` Paul Mundt [this message]
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=20111206055115.GG30055@linux-sh.org \
--to=lethal@linux-sh.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).