ARM: OMAP1: Remove duplicated DMA channel definitions
authorJarkko Nikula <jarkko.nikula@bitmer.com>
Sat, 15 Jun 2013 08:31:07 +0000 (11:31 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 18 Jun 2013 07:12:34 +0000 (00:12 -0700)
commitbf2920aa57f339b3901172ca35fbbf303acf8e16
tree11236740287c6f8e8aa3759c1d40422a378d9260
parentc821c4628a50da66ff9885bf7cd3df965a8464a1
ARM: OMAP1: Remove duplicated DMA channel definitions

Similarly than with OMAP2 there are many DMA channel definitions that have
been moved or redefined in drivers using them and we can remove them from
dma.h.

There is exception with MMC that arch/arm/mach-omap1/devices.c is using
MMC DMA channel definitions for setting platform data but those can be well
replaced with numeric values.

Remove dma.h include from arch/arm/mach-omap1/devices.c and use a script
below for dropping duplicated definitions and for replacing definitions
with DMA channel numbers.

grep '#define OMAP_DMA' arch/arm/mach-omap1/dma.h | while read -r i; do \
DDEF=`echo $i |cut -d ' ' -f 1-2`; \
DEF=`echo $DDEF |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
if [ `git grep -c "$DDEF" |wc -l` -gt 1 ]; then \
echo "removing" $DEF; \
sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/devices.c; \
sed -i "/${DDEF}/d" arch/arm/mach-omap1/dma.h; \
fi; \
done

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/dma.h