diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-11-28 09:09:38 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-30 06:34:50 -0500 |
commit | 4fe338c94986df105c3966a39b5a0af608762891 (patch) | |
tree | d4a90c39d68a2b5c554cbac63031bbba76291eee | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) |
spi: dw-mid: constify dw_spi_dma_ops structure
The dw_spi_dma_ops structure is never modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-dw-mid.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-dw.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c index bb1052e748f2..9185f6c08459 100644 --- a/drivers/spi/spi-dw-mid.c +++ b/drivers/spi/spi-dw-mid.c | |||
@@ -283,7 +283,7 @@ static void mid_spi_dma_stop(struct dw_spi *dws) | |||
283 | } | 283 | } |
284 | } | 284 | } |
285 | 285 | ||
286 | static struct dw_spi_dma_ops mid_dma_ops = { | 286 | static const struct dw_spi_dma_ops mid_dma_ops = { |
287 | .dma_init = mid_spi_dma_init, | 287 | .dma_init = mid_spi_dma_init, |
288 | .dma_exit = mid_spi_dma_exit, | 288 | .dma_exit = mid_spi_dma_exit, |
289 | .dma_setup = mid_spi_dma_setup, | 289 | .dma_setup = mid_spi_dma_setup, |
diff --git a/drivers/spi/spi-dw.h b/drivers/spi/spi-dw.h index 35589a270468..61bc3cbab38d 100644 --- a/drivers/spi/spi-dw.h +++ b/drivers/spi/spi-dw.h | |||
@@ -130,7 +130,7 @@ struct dw_spi { | |||
130 | struct dma_chan *rxchan; | 130 | struct dma_chan *rxchan; |
131 | unsigned long dma_chan_busy; | 131 | unsigned long dma_chan_busy; |
132 | dma_addr_t dma_addr; /* phy address of the Data register */ | 132 | dma_addr_t dma_addr; /* phy address of the Data register */ |
133 | struct dw_spi_dma_ops *dma_ops; | 133 | const struct dw_spi_dma_ops *dma_ops; |
134 | void *dma_tx; | 134 | void *dma_tx; |
135 | void *dma_rx; | 135 | void *dma_rx; |
136 | 136 | ||