From: Michael Turquette <mturquette@linaro.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Michael Welling <mwelling@ieee.org>,
Tero Kristo <t-kristo@ti.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
devicetree <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Tony Lindgren <tony@atomide.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Daniel Mack <daniel@zonque.org>
Subject: Re: AM335x OMAP2 common clock external fixed-clock registration
Date: Fri, 17 Apr 2015 12:56:37 -0700 [thread overview]
Message-ID: <20150417195637.19585.24668@quantum> (raw)
In-Reply-To: <20150417101833.GU4027@n2100.arm.linux.org.uk>
Quoting Russell King - ARM Linux (2015-04-17 03:18:33)
> On Fri, Apr 17, 2015 at 11:12:03AM +0200, Sebastian Hesselbarth wrote:
> > On 17.04.2015 04:00, Michael Welling wrote:
> > >On Fri, Apr 17, 2015 at 01:23:50AM +0200, Sebastian Hesselbarth wrote:
> > >>On 17.04.2015 00:09, Michael Welling wrote:
> > >>>On Thu, Apr 16, 2015 at 10:37:19PM +0200, Sebastian Hesselbarth wrote:
> > >>>>On 16.04.2015 18:17, Michael Welling wrote:
> > [...]
> > >>>What would be the proper error path?
> > >>>What cleanup is required?
> > >>
> > >>A proper error path would be to release any claimed resource
> > >>on any error. If you look at the code, the only resources that
> > >>need to be released are the two clocks in question.
> > >
> > >So for every error return in the probe function and in the of si5351_dt_parse
> > >it needs to clk_put first right?
> >
> > Not quite. The driver should clk_put() every clock that it called a
> > [of_]clk_get() for. The thing is that clocks can be passed by
> > platform_data and we never claim them.
>
> I've always said clocks (as in struct clk) should never be passed through
> platform data.
+1
And for ccf clock drivers Stephen and I plan to change the behavior of
clk_register() at some point so that it returns an error code and not a
struct clk. This will make clk_dev the only way to get at a struct clk
for users of the ccf implementation.
Of course it is still possible to clk_get from some place and pass as
platform_data, but every little bit helps.
Regards,
Mike
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
> --
> 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/
next prev parent reply other threads:[~2015-04-17 19:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 21:17 AM335x OMAP2 common clock external fixed-clock registration Michael Welling
2015-04-15 6:34 ` Tero Kristo
2015-04-15 14:09 ` Michael Welling
2015-04-15 18:43 ` Tero Kristo
2015-04-15 19:47 ` Michael Welling
2015-04-15 20:45 ` Mike Turquette
2015-04-15 20:51 ` Michael Welling
2015-04-16 4:32 ` Tero Kristo
2015-04-16 16:17 ` Michael Welling
2015-04-16 20:37 ` Sebastian Hesselbarth
[not found] ` <55301D7F.30708-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-16 22:09 ` Michael Welling
2015-04-16 23:23 ` Sebastian Hesselbarth
[not found] ` <55304486.5020404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-17 2:00 ` Michael Welling
2015-04-17 7:13 ` Tero Kristo
2015-04-17 9:12 ` Sebastian Hesselbarth
2015-04-17 10:18 ` Russell King - ARM Linux
2015-04-17 19:06 ` Michael Welling
2015-04-17 19:39 ` Russell King - ARM Linux
2015-04-17 19:56 ` Michael Turquette [this message]
2015-04-17 16:59 ` Michael Welling
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=20150417195637.19585.24668@quantum \
--to=mturquette@linaro.org \
--cc=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mwelling@ieee.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=t-kristo@ti.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).