Re: [PATCH v2 2/4] dmaengine: Add STM32 DMA driver

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

 



Hi Daniel,

2015-10-14 10:52 GMT+02:00 Daniel Thompson <daniel.thompson@xxxxxxxxxx>:
> On 14/10/15 08:54, M'boumba Cedric Madianga wrote:
>>>>
>>>> +static int stm32_dma_alloc_chan_resources(struct dma_chan *c)
>>>> +{
>>>> +       struct stm32_dma_chan *chan = to_stm32_dma_chan(c);
>>>> +       struct stm32_dma_device *dmadev = stm32_dma_chan_get_dev(chan);
>>>> +       int ret;
>>>> +
>>>> +       chan->config_init = false;
>>>> +       ret = clk_prepare_enable(dmadev->clk);
>>>> +       if (ret < 0) {
>>>> +               dev_err(chan2dev(chan), "clk_prepare_enable failed:
>>>> %d\n",
>>>> ret);
>>>> +               return ret;
>>>> +       }
>>>> +
>>>> +       ret = stm32_dma_disable_chan(chan);
>>>> +
>>>> +       return ret;
>>>> +}
>>>
>
>
> If stm32_dma_disable_chan() returns an error then we will not restore the
> original the clock counts causing them to "leak".

Ok got it. Thanks for the clarification.
I will fix it in the next version.

BR,
Cedric
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux