linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Inconsistency in clk framework
@ 2012-12-19  4:10 Tony Prisk
  2012-12-19  9:26 ` Russell King - ARM Linux
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Prisk @ 2012-12-19  4:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

In attempting to remove some IS_ERR_OR_NULL references, it was pointed
out that clk_get() can return NULL if CONFIG_HAVE_CLK is not defined.

This seems to contradict the kernel docs associated with the normal
clk_get (when HAVE_CLK is defined) which states:

* Returns a struct clk corresponding to the clock producer, or
* valid IS_ERR() condition containing errno.

Wouldn't a return code of ERR_PTR(-ENOENT) make more sense and be inline
with the empty of_ versions as well (which return -ENOENT when CONFIG_OF
is undefined).

Also, I noticed that clk_get_sys() doesn't appear to be defined in clk.h
when HAVE_CLK is undefined - is this correct?

Regards
Tony Prisk

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-20  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19  4:10 Inconsistency in clk framework Tony Prisk
2012-12-19  9:26 ` Russell King - ARM Linux
2012-12-19 17:34   ` Tony Prisk
2012-12-19 19:00     ` Tony Prisk
2012-12-19 19:08       ` Russell King - ARM Linux
2012-12-20  4:13         ` Tony Prisk
2012-12-20  9:40           ` Russell King - ARM Linux

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).