From: Todd Poynor <toddpoynor@google.com>
To: "Cousson, Benoit" <b-cousson@ti.com>
Cc: "paul@pwsan.com" <paul@pwsan.com>,
"Nayak, Rajendra" <rnayak@ti.com>,
"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Hilman, Kevin" <khilman@ti.com>
Subject: Re: [PATCH 2/7] OMAP: omap_device: Create clkdev entry for hwmod main_clk
Date: Tue, 28 Jun 2011 11:21:42 -0700 [thread overview]
Message-ID: <20110628182142.GA13018@google.com> (raw)
In-Reply-To: <4E09E0EF.9040600@ti.com>
On Tue, Jun 28, 2011 at 04:10:55PM +0200, Cousson, Benoit wrote:
> On 6/27/2011 8:56 PM, Todd Poynor wrote:
> >On Mon, Jun 27, 2011 at 06:33:06PM +0200, Benoit Cousson wrote:
> >...
> >>+ r = clk_get_sys(dev_name(&od->pdev.dev), clk_alias);
> >>+ if (!IS_ERR(r)) {
> >>+ pr_warning("omap_device: %s: %s already exist\n",
> >>+ dev_name(&od->pdev.dev), clk_alias);
> >
> >I believe a clk_put(r) is appropriate here.
>
> Appropriate I don't know, but useless for sure :-)
> This clk_put is a no-op for every ARM platforms (I found one exception).
I haven't followed the design of common struct clk closely, but it
probably will do ref counting on these, so it's best to keep these
matched up.
> >>+ r = omap_clk_get_by_name(clk_name);
> >>+ if (IS_ERR(r)) {
> >>+ pr_err("omap_device: %s: omap_clk_get_by_name for %s failed\n",
> >>+ dev_name(&od->pdev.dev), clk_name);
> >>+ return;
> >>+ }
> >>+
> >>+ l = clkdev_alloc(r, clk_alias, dev_name(&od->pdev.dev));
> >>+ if (!l) {
> >>+ pr_err("omap_device: %s: clkdev_alloc for %s failed\n",
> >>+ dev_name(&od->pdev.dev), clk_alias);
> >
> >And here.
>
> No, it is not needed in that case because the omap_clk_get_by_name
> is not using the clk_get API.
Ah, didn't check that one, sorry. That's an unfortunate use of "get"
in the API name IMO. When common struct clk takes over, this may need
some tweaking.
Todd
next prev parent reply other threads:[~2011-06-28 18:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 16:33 [PATCH 0/7] OMAP4: Add modulemode support to hwmod framework (part 2) Benoit Cousson
2011-06-27 16:33 ` [PATCH 1/7] OMAP: hwmod: Add warnings if enable failed Benoit Cousson
2011-06-27 16:33 ` [PATCH 2/7] OMAP: omap_device: Create clkdev entry for hwmod main_clk Benoit Cousson
2011-06-27 18:56 ` Todd Poynor
2011-06-28 14:10 ` Cousson, Benoit
2011-06-28 18:21 ` Todd Poynor [this message]
2011-06-28 20:09 ` Cousson, Benoit
2011-06-27 16:33 ` [PATCH 3/7] OMAP4: hwmod data: TEMP: Do not idle MMC1 & MMC2 after boot Benoit Cousson
2011-06-28 0:17 ` Kevin Hilman
2011-06-28 9:40 ` Cousson, Benoit
2011-06-27 16:33 ` [PATCH 4/7] OMAP4: hwmod data: Replace main_clk with the real input clock Benoit Cousson
2011-06-28 6:40 ` Tomi Valkeinen
2011-06-28 8:10 ` Cousson, Benoit
2011-06-28 8:14 ` Tomi Valkeinen
2011-06-28 8:27 ` Cousson, Benoit
2011-06-28 8:37 ` Tomi Valkeinen
2011-06-27 16:33 ` [PATCH 5/7] OMAP4: clock data: Remove leaf clock nodes Benoit Cousson
2011-06-27 16:33 ` [PATCH 6/7] OMAP4: hwmod data: TEMP: Fix timer1 main_clk Benoit Cousson
2011-06-28 0:19 ` Kevin Hilman
2011-06-28 9:27 ` Cousson, Benoit
2011-06-28 15:17 ` Kevin Hilman
2011-06-27 16:33 ` [PATCH 7/7] OMAP4: prcm: Remove macros with absolute address Benoit Cousson
2011-06-28 0:30 ` [PATCH 0/7] OMAP4: Add modulemode support to hwmod framework (part 2) Kevin Hilman
2011-06-28 14:45 ` Cousson, Benoit
2011-06-28 6:56 ` Tomi Valkeinen
2011-06-28 8:14 ` Cousson, Benoit
2011-06-28 8:29 ` Tomi Valkeinen
2011-06-28 9:14 ` Cousson, Benoit
2011-06-28 9:20 ` Tomi Valkeinen
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=20110628182142.GA13018@google.com \
--to=toddpoynor@google.com \
--cc=b-cousson@ti.com \
--cc=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=santosh.shilimkar@ti.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