[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABb+yY36pQ7oXC1OKEQ-1V55c2SZurcTAPaZ=_PWugqxdL2rgg@mail.gmail.com>
Date: Wed, 26 Sep 2012 15:02:01 +0530
From: Jassi Brar <jassisinghbrar@...il.com>
To: Inderpal Singh <inderpal.singh@...aro.org>
Cc: linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
boojin.kim@...sung.com, vinod.koul@...el.com, patches@...aro.org,
kgene.kim@...sung.com
Subject: Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe
On Wed, Sep 26, 2012 at 12:11 PM, Inderpal Singh
<inderpal.singh@...aro.org> wrote:
> How about conditionally DMA_TERMINATE_ALL and free resources like below ?
>
> @@ -3017,9 +3017,11 @@ static int __devexit pl330_remove(struct
> amba_device *adev)
> /* Remove the channel */
> list_del(&pch->chan.device_node);
>
> - /* Flush the channel */
> - pl330_control(&pch->chan, DMA_TERMINATE_ALL, 0);
> - pl330_free_chan_resources(&pch->chan);
> + if (pch->chan.client_count != 0) {
> + /* Flush the channel */
> + pl330_control(&pch->chan, DMA_TERMINATE_ALL, 0);
> + pl330_free_chan_resources(&pch->chan);
> + }
> }
>
It is perfectly safe to flush the channels that have client_count == 0
as well. Which is already the case.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists