diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-04-21 15:36:49 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 15:50:50 +0900 |
commit | 5bac942db3d2c4738df04104240d65a5d1eaec6a (patch) | |
tree | 253c75407764fc5cb3483283941b14a99fad389a /include/linux/sh_dma.h | |
parent | 6b6b18e62cfba44ce7b6489c7100f12b199232d7 (diff) | |
download | lwn-5bac942db3d2c4738df04104240d65a5d1eaec6a.tar.gz lwn-5bac942db3d2c4738df04104240d65a5d1eaec6a.zip |
SH: constify multiple DMA related objects and references to them
Lists of DMA channels and slaves are not changed, make them constant. Besides,
SH7724 channel and slave configuration of both DMA controllers is identical,
remove the extra copy of the configuration data.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_dma.h')
-rw-r--r-- | include/linux/sh_dma.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index cdaaff424211..b08cd4efa15c 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h @@ -17,7 +17,7 @@ struct sh_dmae_slave { unsigned int slave_id; /* Set by the platform */ struct device *dma_dev; /* Set by the platform */ - struct sh_dmae_slave_config *config; /* Set by the driver */ + const struct sh_dmae_slave_config *config; /* Set by the driver */ }; struct sh_dmae_regs { @@ -36,6 +36,7 @@ struct sh_desc { int chunks; int mark; }; + struct sh_dmae_slave_config { unsigned int slave_id; dma_addr_t addr; @@ -50,15 +51,15 @@ struct sh_dmae_channel { }; struct sh_dmae_pdata { - struct sh_dmae_slave_config *slave; + const struct sh_dmae_slave_config *slave; int slave_num; - struct sh_dmae_channel *channel; + const struct sh_dmae_channel *channel; int channel_num; unsigned int ts_low_shift; unsigned int ts_low_mask; unsigned int ts_high_shift; unsigned int ts_high_mask; - unsigned int *ts_shift; + const unsigned int *ts_shift; int ts_shift_num; u16 dmaor_init; }; |