summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-11-08 14:53:35 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-04-03 23:31:43 (GMT)
commitad0c381a8b3a15b8edfca0996729ea45692470ca (patch)
tree0c693b5259fc2150182999a1aa06a807ecf04263 /arch/arm/mach-omap1
parente38b1485fde832f72ab478f947f6e78a8e28c58b (diff)
downloadlinux-ad0c381a8b3a15b8edfca0996729ea45692470ca.tar.xz
ARM: omap: remove almost-const variables
dma_stride and dma_common_ch_start are only ever initialised to one known value at initialisation, and are private to each of these files. There's no point these being variables at all. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/dma.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index d292055..11f0b0e 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -36,8 +36,6 @@
static u32 errata;
static u32 enable_1510_mode;
-static u8 dma_stride;
-static enum omap_reg_offsets dma_common_ch_start, dma_common_ch_end;
static u16 reg_map[] = {
[GCR] = 0x400,
@@ -184,7 +182,7 @@ static inline void dma_write(u32 val, int reg, int lch)
u8 stride;
u32 offset;
- stride = (reg >= dma_common_ch_start) ? dma_stride : 0;
+ stride = (reg >= CPC) ? OMAP1_DMA_STRIDE : 0;
offset = reg_map[reg] + (stride * lch);
__raw_writew(val, dma_base + offset);
@@ -200,7 +198,7 @@ static inline u32 dma_read(int reg, int lch)
u8 stride;
u32 offset, val;
- stride = (reg >= dma_common_ch_start) ? dma_stride : 0;
+ stride = (reg >= CPC) ? OMAP1_DMA_STRIDE : 0;
offset = reg_map[reg] + (stride * lch);
val = __raw_readw(dma_base + offset);
@@ -216,9 +214,9 @@ static inline u32 dma_read(int reg, int lch)
static void omap1_clear_lch_regs(int lch)
{
- int i = dma_common_ch_start;
+ int i;
- for (; i <= dma_common_ch_end; i += 1)
+ for (i = CPC; i <= COLOR; i += 1)
dma_write(0, i, lch);
}
@@ -380,10 +378,6 @@ static int __init omap1_system_dma_init(void)
goto exit_release_chan;
}
- dma_stride = OMAP1_DMA_STRIDE;
- dma_common_ch_start = CPC;
- dma_common_ch_end = COLOR;
-
dma_pdev = platform_device_register_full(&omap_dma_dev_info);
if (IS_ERR(dma_pdev)) {
ret = PTR_ERR(dma_pdev);