From: Florian Fainelli <florian@openwrt.org>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Kelvin Cheung <keguang.zhang@gmail.com>,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
wuzhangjin@gmail.com, zhzhl555@gmail.com
Subject: Re: [PATCH V7 2/4] MIPS: Add board support for Loongson1B
Date: Wed, 20 Jun 2012 22:10:26 +0200 [thread overview]
Message-ID: <1463808.aB2kcWCEuH@bender> (raw)
In-Reply-To: <4FE225F3.4080806@mvista.com>
On Wednesday 20 June 2012 23:35:15 Sergei Shtylyov wrote:
> Hello.
>
> On 06/20/2012 11:25 PM, Ralf Baechle wrote:
>
> >> +#include <linux/clk.h>
>
> >> +static LIST_HEAD(clocks);
> >> +static DEFINE_MUTEX(clocks_mutex);
> >> +
> >> +struct clk *clk_get(struct device *dev, const char *name)
> >> +{
> >> + struct clk *c;
> >> + struct clk *ret = NULL;
> >> +
> >> + mutex_lock(&clocks_mutex);
> >> + list_for_each_entry(c, &clocks, node) {
> >> + if (!strcmp(c->name, name)) {
> >> + ret = c;
> >> + break;
> >> + }
> >> + }
> >> + mutex_unlock(&clocks_mutex);
> >> +
> >> + return ret;
> >> +}
> >> +EXPORT_SYMBOL(clk_get);
>
> > This redefines a function that already is declared in <linux/clk.h> and
> > defined in drivers/clk/clkdev.c. Why?
>
> Because he doesn't support clkdev? clkdev support is optional.
I don't think it is a good idea not to support clkdev for new targets. Ralf
what do you think about it?
>
> >> +int clk_register(struct clk *clk)
> >> +{
> >> + mutex_lock(&clocks_mutex);
> >> + list_add(&clk->node, &clocks);
> >> + if (clk->ops->init)
> >> + clk->ops->init(clk);
> >> + mutex_unlock(&clocks_mutex);
> >> +
> >> + return 0;
> >> +}
> >> +EXPORT_SYMBOL(clk_register);
>
> > Same here.
>
> > Ralf
>
> WBR, Sergei
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Florian
next prev parent reply other threads:[~2012-06-20 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 10:53 [PATCH V7 0/4] MIPS: Add support for Loongson1B Kelvin Cheung
2012-06-15 10:53 ` [PATCH V7 1/4] MIPS: Add CPU " Kelvin Cheung
2012-06-20 19:13 ` Ralf Baechle
2012-06-15 10:53 ` [PATCH V7 2/4] MIPS: Add board " Kelvin Cheung
2012-06-20 19:25 ` Ralf Baechle
2012-06-20 19:35 ` Sergei Shtylyov
2012-06-20 20:10 ` Florian Fainelli [this message]
2012-06-21 11:32 ` Ralf Baechle
[not found] ` <CAJhJPsV2D3xVbA93OpaB8mN6Vs64EmWjxhCbpCMBA5r+wx8mnQ@mail.gmail.com>
2012-06-21 8:18 ` Florian Fainelli
2012-06-15 10:53 ` [PATCH V7 3/4] MIPS: Add Makefile and Kconfig " Kelvin Cheung
2012-06-15 10:53 ` [PATCH V7 4/4] MIPS: Add defconfig " Kelvin Cheung
-- strict thread matches above, loose matches on Subject: below --
2012-07-07 9:29 [PATCH V7 2/4] MIPS: Add board support " Kelvin Cheung
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=1463808.aB2kcWCEuH@bender \
--to=florian@openwrt.org \
--cc=keguang.zhang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=sshtylyov@mvista.com \
--cc=wuzhangjin@gmail.com \
--cc=zhzhl555@gmail.com \
/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