From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Wu, Josh" <Josh.wu@atmel.com>
Cc: g.liakhovetski@gmx.de, linux-media@vger.kernel.org, "Ferre,
Nicolas" <Nicolas.FERRE@atmel.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] [media] V4L: atmel-isi: add code to enable/disableISI_MCK clock
Date: Wed, 7 Dec 2011 22:39:52 +0000 [thread overview]
Message-ID: <20111207223952.GH14542@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4C79549CB6F772498162A641D92D5328039E9C15@penmb01.corp.atmel.com>
On Wed, Dec 07, 2011 at 06:12:52PM +0800, Wu, Josh wrote:
> Hi, Russell King
>
> On Wed, Dec 07, 2011 at 4:50 PM, Russell King wrote:
>
> > On Wed, Nov 30, 2011 at 06:06:43PM +0800, Josh Wu wrote:
> >> + /* Get ISI_MCK, provided by programmable clock or external clock
> */
> >> + isi->mck = clk_get(dev, "isi_mck");
> >> + if (IS_ERR_OR_NULL(isi->mck)) {
>
> > This should be IS_ERR()
>
> So it means the clk_get() will never return NULL even when clk structure
> is NULL in clk lookup entry. Right?
It is not the drivers business to know whether NULL is valid or not.
clk_get() is defined to either return an error pointer, or a cookie
which the rest of the clk API must accept.
If an implementation decides that clk_get() can return NULL and deals
with that in the rest of the API (eg, to mean 'there is no clock but
don't fail for this') then drivers must not reject that.
If a driver rejects NULL then it is performing checks outside of the
definition of the clk API, and making assumptions about the nature of
valid cookies.
next prev parent reply other threads:[~2011-12-07 22:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 10:06 [PATCH 1/2] [media] V4L: atmel-isi: add code to enable/disable ISI_MCK clock Josh Wu
2011-11-30 10:06 ` [PATCH 2/2] [media] V4L: atmel-isi: add clk_prepare()/clk_unprepare() functions Josh Wu
2011-12-06 9:49 ` Guennadi Liakhovetski
2011-12-07 6:09 ` Wu, Josh
2011-12-07 8:49 ` [PATCH 1/2] [media] V4L: atmel-isi: add code to enable/disable ISI_MCK clock Russell King - ARM Linux
2011-12-07 10:12 ` [PATCH 1/2] [media] V4L: atmel-isi: add code to enable/disableISI_MCK clock Wu, Josh
2011-12-07 22:39 ` Russell King - ARM Linux [this message]
2011-12-08 3:18 ` [PATCH 1/2] [media] V4L: atmel-isi: add code toenable/disableISI_MCK clock Wu, Josh
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=20111207223952.GH14542@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=Josh.wu@atmel.com \
--cc=Nicolas.FERRE@atmel.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@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
all inboxes | Powered by JetHome®