From: Phil Edworthy <phil.edworthy@renesas.com>
To: Greg Ungerer <gerg@linux-m68k.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-m68k@lists.linux-m68k.org"
<linux-m68k@lists.linux-m68k.org>
Subject: RE: [PATCH v6 3/6] m68k: coldfire: Add clk_get_optional() function
Date: Thu, 29 Nov 2018 12:02:17 +0000 [thread overview]
Message-ID: <TY1PR01MB1769821858C257F94E9470BAF5D20@TY1PR01MB1769.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <bcb0278b-a4f5-068b-324f-7be3ca963102@linux-m68k.org>
Hi Greq,
On 29 November 2018 11:55, Greg Ungerer wrote:
> On 17/11/18 12:59 am, Phil Edworthy wrote:
> > clk_get_optional() returns NULL if not found instead of -ENOENT,
> > otherwise the behaviour is the same as clk_get().
> >
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>
> Acked-by: Greg Ungerer <gerg@@linux-m68k.org>
>
> Looks good. Do you want me to take this in the m68knommu git tree?
> Or is the whole series going through some other tree?
This patch is no longer needed as I found a better way to implement this:
[PATCH v8] clk: Add (devm_)clk_get_optional() functions
https://patchwork.kernel.org/patch/10690437/
Apologies for any confusion,
Phil
> Regards
> Greg
>
>
>
> > ---
> > arch/m68k/coldfire/clk.c | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c index
> > 7bc666e482eb..b221cabc7f54 100644
> > --- a/arch/m68k/coldfire/clk.c
> > +++ b/arch/m68k/coldfire/clk.c
> > @@ -87,6 +87,17 @@ struct clk *clk_get(struct device *dev, const char *id)
> > }
> > EXPORT_SYMBOL(clk_get);
> >
> > +struct clk *clk_get_optional(struct device *dev, const char *id) {
> > + struct clk *clk = clk_get(dev, id);
> > +
> > + if (clk == ERR_PTR(-ENOENT))
> > + clk = NULL;
> > +
> > + return clk;
> > +}
> > +EXPORT_SYMBOL(clk_get_optional);
> > +
> > int clk_enable(struct clk *clk)
> > {
> > unsigned long flags;
> >
next prev parent reply other threads:[~2018-11-29 12:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 14:59 [PATCH v6 0/6] clk: Add functions to get optional clocks Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 1/6] clk: Add of_clk_get_by_name_optional() function Phil Edworthy
2018-11-16 16:01 ` Uwe Kleine-König
2018-11-16 16:11 ` Uwe Kleine-König
2018-11-19 10:41 ` Phil Edworthy
2018-11-19 10:46 ` Uwe Kleine-König
2018-11-19 12:53 ` Phil Edworthy
2018-11-19 12:58 ` Uwe Kleine-König
2018-11-19 13:41 ` Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 2/6] clk: Add (devm_)clk_get_optional() functions Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 3/6] m68k: coldfire: Add clk_get_optional() function Phil Edworthy
2018-11-29 11:54 ` Greg Ungerer
2018-11-29 12:02 ` Phil Edworthy [this message]
2018-11-29 12:10 ` Greg Ungerer
2018-11-29 16:32 ` Christoph Hellwig
2018-12-03 12:29 ` Greg Ungerer
2018-11-16 14:59 ` [PATCH v6 4/6] MIPS: AR7: " Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 5/6] MIPS: Loongson 2F: " Phil Edworthy
2018-11-16 14:59 ` [PATCH v6 6/6] arch/unicore32/kernel/clock.c: " Phil Edworthy
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=TY1PR01MB1769821858C257F94E9470BAF5D20@TY1PR01MB1769.jpnprd01.prod.outlook.com \
--to=phil.edworthy@renesas.com \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-renesas-soc@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).