Re: [PATCH 04/15] dma: imx-sdma: Useclk_prepare_enable/clk_disable_unprepare

From: Sascha Hauer
Date: Sat May 26 2012 - 07:30:49 EST


On Fri, May 25, 2012 at 08:14:45PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
>
> Prepare the clock before enabling it.
>
> Cc: Vinod Koul <vinod.koul@xxxxxxxxx>
> Cc: <linux-kernel@xxxxxxxxxxxxxxx>
> Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>
> ---
> drivers/dma/imx-sdma.c | 28 ++++++++++++++--------------
> 1 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index fb4f499..b6174e6 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -868,8 +868,8 @@ static int sdma_alloc_chan_resources(struct dma_chan *chan)
> sdmac->peripheral_type = data->peripheral_type;
> sdmac->event_id0 = data->dma_request;
>
> - clk_enable(sdmac->sdma->clk_ipg);
> - clk_enable(sdmac->sdma->clk_ahb);
> + clk_prepare_enable(sdmac->sdma->clk_ipg);
> + clk_prepare_enable(sdmac->sdma->clk_ahb);

No, the clock already is prepared, see the probe function.

Sascha

--
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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/