From: Peppe CAVALLARO <peppe.cavallaro@st.com>
To: Jamie Iles <jamie@jamieiles.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 10/16] drivers/net: stmmac: don't treat NULL clk as an error
Date: Wed, 12 Jan 2011 09:00:35 +0100 [thread overview]
Message-ID: <4D2D5FA3.507@st.com> (raw)
In-Reply-To: <1294749833-32019-11-git-send-email-jamie@jamieiles.com>
Hello
On 1/11/2011 1:43 PM, Jamie Iles wrote:
>
> clk_get() returns a struct clk cookie to the driver and some platforms
> may return NULL if they only support a single clock. clk_get() has only
> failed if it returns a ERR_PTR() encoded pointer.
>
Thanks for the patch that actually useful.
I'm going to rework this part of the driver.
At any rate, all my new changes can be done on top of this patch.
Regards,
Peppe
>
>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: netdev@vger.kernel.org
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
> drivers/net/stmmac/stmmac_timer.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/stmmac/stmmac_timer.c
> b/drivers/net/stmmac/stmmac_timer.c
> index 2a0e1ab..ebb1b37 100644
> --- a/drivers/net/stmmac/stmmac_timer.c
> +++ b/drivers/net/stmmac/stmmac_timer.c
> @@ -91,6 +91,7 @@ int stmmac_close_ext_timer(void)
>
> #elif defined(CONFIG_STMMAC_TMU_TIMER)
> #include <linux/clk.h>
> +#include <linux/err.h>
> #define TMU_CHANNEL "tmu2_clk"
> static struct clk *timer_clock;
>
> @@ -109,7 +110,7 @@ int stmmac_open_ext_timer(struct net_device *dev,
> struct stmmac_timer *tm)
> {
> timer_clock = clk_get(NULL, TMU_CHANNEL);
>
> - if (timer_clock == NULL)
> + if (IS_ERR(timer_clock))
> return -1;
>
> if (tmu2_register_user(stmmac_timer_handler, (void *)dev) < 0) {
> --
> 1.7.3.4
>
next prev parent reply other threads:[~2011-01-12 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1294749833-32019-1-git-send-email-jamie@jamieiles.com>
2011-01-11 12:43 ` [PATCH 10/16] drivers/net: stmmac: don't treat NULL clk as an error Jamie Iles
2011-01-12 8:00 ` Peppe CAVALLARO [this message]
2011-01-11 12:43 ` [PATCH 11/16] drivers/net: sh_irda: " Jamie Iles
2011-01-11 12:43 ` [PATCH 14/16] can: mpc5xxx_can: " Jamie Iles
2011-01-11 15:18 ` Wolfram Sang
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=4D2D5FA3.507@st.com \
--to=peppe.cavallaro@st.com \
--cc=jamie@jamieiles.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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).