minor omap dma fixes
Subsystems (2)
v2 cover minor omap dma fixes
Hi,
Here are some minor omap dma fixes.
v2:
Patch 3/3 was wrongly fixed by just changing the kfree() order. As Russell suggested the kfree() was that for platform_data and wrong to begin with. So Patch 3/3 now removes all instances of kfree() of platform_data.
R Sricharan (2):
ARM: OMAP: dma: Remove the wrong dev_id check
ARM: OMAP: dma: Fix the dma_chan_link_map init order
Rajendra Nayak (1):
ARM: OMAP: dma: Remove the erroneous freeing of platform data
arch/arm/plat-omap/dma.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/3 ARM: OMAP: dma: Remove the wrong dev_id check
From: R Sricharan <[email protected]>
Once a free channel is found, the check for dev_id == 0 does not make any sense. Get rid of it.
--- arch/arm/plat-omap/dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-omap/dma.c +2 -2
@@ -701,8 +701,8 @@ int omap_request_dma(int dev_id, const char *dev_name,for (ch =0 ; ch < dma_chan_count; ch++) {if (free_ch ==-1 && dma_chan[ch].dev_id ==-1 ) { free_ch = ch; -if (dev_id ==0 ) -break ; +/* Exit after first free channel found */ +break ; } }if (free_ch ==-1 ) {
Signature · 1 line
1.7.9.5
PATCH v2 2/3 ARM: OMAP: dma: Fix the dma_chan_link_map init order
In reply to Rajendra NayakFrom: R Sricharan <[email protected]>
Init dma_chan_link_map[lch] *after* its memset to 0.
--- arch/arm/plat-omap/dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/plat-omap/dma.c +2 -1
@@ -894,11 +894,12 @@ void omap_start_dma(int lch)int next_lch, cur_lch;char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT ]; - dma_chan_link_map[lch] =1 ;/* Set the link register of the first channel */ enable_lnk (lch);memset (dma_chan_link_map,0 ,sizeof (dma_chan_link_map)); + dma_chan_link_map[lch] =1 ; + cur_lch = dma_chan[lch].next_lch; do { next_lch = dma_chan[cur_lch].next_lch;
Signature · 1 line
1.7.9.5
PATCH v2 3/3 ARM: OMAP: dma: Remove the erroneous freeing of platform data
In reply to Rajendra NayakGiven p = pdev->dev.platform_data; and
d = p->dma_attr;
the freeing of either one of these by the driver
seems just plain wrong.
Get rid of them in the .probe failure path as well as the .remove.
--- arch/arm/plat-omap/dma.c | 4 ---- 1 file changed, 4 deletions(-)
arch/arm/plat-omap/dma.c +0 -4
@@ -2111,8 +2111,6 @@ exit_dma_irq_fail: } exit_dma_lch_fail: -kfree (p); -kfree (d);kfree (dma_chan);return ret; }
@@ -2133,8 +2131,6 @@ static int omap_system_dma_remove(struct platform_device *pdev)free_irq (dma_irq, (void *)(irq_rel +1 )); } } -kfree (p); -kfree (d);kfree (dma_chan);return 0 ; }
Signature · 1 line
1.7.9.5
v2 cover minor omap dma fixes
In reply to Rajendra NayakQuoted 10 lines · Rajendra Nayak
Hi,
Here are some minor omap dma fixes.
v2:
Patch 3/3 was wrongly fixed by just changing thekfree()order. As Russell suggested thekfree()was that forplatform_dataand wrong to begin with. So Patch 3/3 now removes all instances ofkfree()ofplatform_data.
Thanks applying into omap-for-v3.11/dma.
Regards,
Tony
Quoted 13 lines
R Sricharan (2):
ARM: OMAP: dma: Remove the wrongdev_idcheck
ARM: OMAP: dma: Fix thedma_chan_link_mapinit orderRajendra Nayak (1):
ARM: OMAP: dma: Remove the erroneous freeing of platform dataarch/arm/plat-omap/dma.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)Signature · 1 line
1.7.9.5