• Jarkko Nikula's avatar
    ARM: OMAP1: Remove duplicated DMA channel definitions · bf2920aa
    Jarkko Nikula authored
    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: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    bf2920aa
devices.c 11.1 KB