Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-10-01 Thread Inderpal Singh
On 28 September 2012 16:28, Jassi Brar wrote: > On Fri, Sep 28, 2012 at 10:03 AM, Inderpal Singh > wrote: >> >> Now, if we have to check if any client is using the channel and then >> decide. We will have to traverse the channel list twice once to check >> the usage and second time to delete the

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-28 Thread Jassi Brar
On Fri, Sep 28, 2012 at 10:03 AM, Inderpal Singh wrote: > > Now, if we have to check if any client is using the channel and then > decide. We will have to traverse the channel list twice once to check > the usage and second time to delete the nodes from the list if we go > ahead with remove. > The

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-27 Thread Inderpal Singh
On 27 September 2012 21:36, Jassi Brar wrote: > On Thu, Sep 27, 2012 at 9:11 PM, Inderpal Singh > wrote: >> On 27 September 2012 15:18, Vinod Koul wrote: >>> On Wed, 2012-09-26 at 12:11 +0530, Inderpal Singh wrote: If we fail pl330_remove while some client is queued, the force unload w

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-27 Thread Jassi Brar
On Thu, Sep 27, 2012 at 9:11 PM, Inderpal Singh wrote: > On 27 September 2012 15:18, Vinod Koul wrote: >> On Wed, 2012-09-26 at 12:11 +0530, Inderpal Singh wrote: >>> If we fail pl330_remove while some client is queued, the force unload >>> will fail and the >>> force unload will lose its purpose

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-27 Thread Inderpal Singh
On 27 September 2012 15:18, Vinod Koul wrote: > On Wed, 2012-09-26 at 12:11 +0530, Inderpal Singh wrote: >> If we fail pl330_remove while some client is queued, the force unload >> will fail and the >> force unload will lose its purpose. >> How about conditionally DMA_TERMINATE_ALL and free resour

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-27 Thread Vinod Koul
On Wed, 2012-09-26 at 12:11 +0530, Inderpal Singh wrote: > If we fail pl330_remove while some client is queued, the force unload > will fail and the > force unload will lose its purpose. > How about conditionally DMA_TERMINATE_ALL and free resources like > below ? Why would you want to remove the

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Jassi Brar
On Thu, Sep 27, 2012 at 11:00 AM, Inderpal Singh wrote: > On 27 September 2012 10:35, Jassi Brar wrote: >> On Thu, Sep 27, 2012 at 9:43 AM, Inderpal Singh >> wrote: >>> >>> Don't you think free_chan_resource should be done __only if__ >>> alloc_chan_resource was successful ? >>> >> No, I don't t

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Inderpal Singh
On 27 September 2012 10:35, Jassi Brar wrote: > On Thu, Sep 27, 2012 at 9:43 AM, Inderpal Singh > wrote: >> >> Don't you think free_chan_resource should be done __only if__ >> alloc_chan_resource was successful ? >> > No, I don't think so. Thanks. Thanks for quick response. Please elaborate more

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Jassi Brar
On Thu, Sep 27, 2012 at 9:43 AM, Inderpal Singh wrote: > > Don't you think free_chan_resource should be done __only if__ > alloc_chan_resource was successful ? > No, I don't think so. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to maj

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Inderpal Singh
On 26 September 2012 22:19, Jassi Brar wrote: > On Wed, Sep 26, 2012 at 4:25 PM, Inderpal Singh > wrote: >> On 26 September 2012 15:02, Jassi Brar wrote: >>> On Wed, Sep 26, 2012 at 12:11 PM, Inderpal Singh >>> wrote: >>> How about conditionally DMA_TERMINATE_ALL and free resources like be

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Jassi Brar
On Wed, Sep 26, 2012 at 4:25 PM, Inderpal Singh wrote: > On 26 September 2012 15:02, Jassi Brar wrote: >> On Wed, Sep 26, 2012 at 12:11 PM, Inderpal Singh >> wrote: >> >>> How about conditionally DMA_TERMINATE_ALL and free resources like below ? >>> >>> @@ -3017,9 +3017,11 @@ static int __devexi

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Inderpal Singh
On 26 September 2012 15:02, Jassi Brar wrote: > On Wed, Sep 26, 2012 at 12:11 PM, Inderpal Singh > 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) >> /

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-26 Thread Jassi Brar
On Wed, Sep 26, 2012 at 12:11 PM, Inderpal Singh 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->

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-25 Thread Inderpal Singh
On 25 September 2012 18:47, Jassi Brar wrote: > On Tue, Sep 25, 2012 at 2:27 PM, Inderpal Singh > wrote: >> Since peripheral channel resources are not being allocated at probe, >> no need to flush the channels and free the resources in remove function. >> >> Signed-off-by: Inderpal Singh >> ---

Re: [PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-25 Thread Jassi Brar
On Tue, Sep 25, 2012 at 2:27 PM, Inderpal Singh wrote: > Since peripheral channel resources are not being allocated at probe, > no need to flush the channels and free the resources in remove function. > > Signed-off-by: Inderpal Singh > --- > drivers/dma/pl330.c |8 +--- > 1 file changed

[PATCH 3/3] DMA: PL330: Balance module remove function with probe

2012-09-25 Thread Inderpal Singh
Since peripheral channel resources are not being allocated at probe, no need to flush the channels and free the resources in remove function. Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/dma/pl330.c b/