Re: [PATCH 14/15] usb: imx21-hcd.c: Use clk_prepare_enable/clk_disable_unprepare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2012 at 08:14:55PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> 
> Prepare the clock before enabling it.
> 
> Cc: Felipe Balbi <balbi@xxxxxx>
> Cc: <linux-usb@xxxxxxxxxxxxxxx>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

Acked-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

> ---
>  drivers/usb/host/imx21-hcd.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/imx21-hcd.c b/drivers/usb/host/imx21-hcd.c
> index ff471c1..f19e269 100644
> --- a/drivers/usb/host/imx21-hcd.c
> +++ b/drivers/usb/host/imx21-hcd.c
> @@ -1811,7 +1811,7 @@ static int imx21_remove(struct platform_device *pdev)
>  	usb_remove_hcd(hcd);
>  
>  	if (res != NULL) {
> -		clk_disable(imx21->clk);
> +		clk_disable_unprepare(imx21->clk);
>  		clk_put(imx21->clk);
>  		iounmap(imx21->regs);
>  		release_mem_region(res->start, resource_size(res));
> @@ -1884,7 +1884,7 @@ static int imx21_probe(struct platform_device *pdev)
>  	ret = clk_set_rate(imx21->clk, clk_round_rate(imx21->clk, 48000000));
>  	if (ret)
>  		goto failed_clock_set;
> -	ret = clk_enable(imx21->clk);
> +	ret = clk_prepare_enable(imx21->clk);
>  	if (ret)
>  		goto failed_clock_enable;
>  
> @@ -1900,7 +1900,7 @@ static int imx21_probe(struct platform_device *pdev)
>  	return 0;
>  
>  failed_add_hcd:
> -	clk_disable(imx21->clk);
> +	clk_disable_unprepare(imx21->clk);
>  failed_clock_enable:
>  failed_clock_set:
>  	clk_put(imx21->clk);
> -- 
> 1.7.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux