From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hauke Mehrtens <hauke@hauke-m.de>, ralf@linux-mips.org
Cc: blogic@openwrt.org, linux-mips@linux-mips.org,
"# 4 . 1+" <stable@vger.kernel.org>
Subject: Re: [PATCH] MIPS: lantiq: add clk_round_rate()
Date: Mon, 26 Oct 2015 13:50:45 +0300 [thread overview]
Message-ID: <562E0585.1010801@cogentembedded.com> (raw)
In-Reply-To: <1445811702-27936-1-git-send-email-hauke@hauke-m.de>
Hello.
On 10/26/2015 1:21 AM, Hauke Mehrtens wrote:
> This adds a basic implementation of clk_round_rate()
> The clk_round_rate() function is called by multiple drivers and
> subsystems now and the lantiq clk driver is supposed to export this,
> but doesn't do so, this causes linking problems like this one:
> ERROR: "clk_round_rate" [drivers/media/v4l2-core/videodev.ko] undefined!
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> Cc: <stable@vger.kernel.org> # 4.1+
> ---
> arch/mips/lantiq/clk.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c
> index 3fc2e6d..a0706fd 100644
> --- a/arch/mips/lantiq/clk.c
> +++ b/arch/mips/lantiq/clk.c
> @@ -99,6 +99,23 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
> }
> EXPORT_SYMBOL(clk_set_rate);
>
> +long clk_round_rate(struct clk *clk, unsigned long rate)
> +{
> + if (unlikely(!clk_good(clk)))
> + return 0;
> + if (clk->rates && *clk->rates) {
> + unsigned long *r = clk->rates;
> +
> + while (*r && (*r != rate))
> + r++;
> + if (!*r) {
> + return clk->rate;
> + }
{} not needed here.
[...]
MBR, Sergei
prev parent reply other threads:[~2015-10-26 10:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-25 22:21 [PATCH] MIPS: lantiq: add clk_round_rate() Hauke Mehrtens
2015-10-26 6:56 ` John Crispin
2015-10-26 10:50 ` Sergei Shtylyov [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=562E0585.1010801@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=blogic@openwrt.org \
--cc=hauke@hauke-m.de \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=stable@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