public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] can: at91_can: prepare and unprepare the clock
Date: Wed, 17 Sep 2014 11:12:55 +0200	[thread overview]
Message-ID: <54195097.1000106@pengutronix.de> (raw)
In-Reply-To: <1410944721-32325-1-git-send-email-davidcdueck@googlemail.com>

On 09/17/2014 11:05 AM, David Dueck wrote:
> This prevents a warning.

Which warning?

Can you please check the return value of clock_prepare_enbale().

Marc

BTW: Please add linux-can at vger.kernel.org on Cc for CAN related patches.

> Signed-off-by: David Dueck <davidcdueck@googlemail.com>
> Signed-off-by: Anthony Harivel <anthony.harivel@emtrion.de>
> ---
>  drivers/net/can/at91_can.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
> index f07fa89..7dcb790 100644
> --- a/drivers/net/can/at91_can.c
> +++ b/drivers/net/can/at91_can.c
> @@ -1123,7 +1123,7 @@ static int at91_open(struct net_device *dev)
>  	struct at91_priv *priv = netdev_priv(dev);
>  	int err;
>  
> -	clk_enable(priv->clk);
> +	clk_prepare_enable(priv->clk);
>  
>  	/* check or determine and set bittime */
>  	err = open_candev(dev);
> @@ -1149,7 +1149,7 @@ static int at91_open(struct net_device *dev)
>   out_close:
>  	close_candev(dev);
>   out:
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  
>  	return err;
>  }
> @@ -1166,7 +1166,7 @@ static int at91_close(struct net_device *dev)
>  	at91_chip_stop(dev, CAN_STATE_STOPPED);
>  
>  	free_irq(dev->irq, dev);
> -	clk_disable(priv->clk);
> +	clk_disable_unprepare(priv->clk);
>  
>  	close_candev(dev);
>  
> 


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140917/e395fcfd/attachment-0001.sig>

  reply	other threads:[~2014-09-17  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17  9:05 [PATCH] can: at91_can: prepare and unprepare the clock David Dueck
2014-09-17  9:12 ` Marc Kleine-Budde [this message]
2014-09-17 10:11   ` D. Dueck

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=54195097.1000106@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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