diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-11-06 16:55:31 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-11-07 15:02:55 -0500 |
commit | 8e2b36ea6e3abc613cbbdb41692fbd2f9ee18996 (patch) | |
tree | b1d0ea90512b95b4b282081c134f275c11a6d425 | |
parent | 517cb9f1bb0afd38bebe9b0af1b524b8a65afdb4 (diff) |
mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end
The of_device_id match data is now marked as const and
must not be modified. This changes the dw_mmc to mark
all pointers passing the dw_mci_drv_data or dw_mci_dma_ops
structures as const, and also marks the static definitions
as const.
drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe':
drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/host/dw_mmc-exynos.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc-pltfm.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc-pltfm.h | 2 | ||||
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 2 | ||||
-rw-r--r-- | include/linux/mmc/dw_mmc.h | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 0147ac3aad59..4d50da618166 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c | |||
@@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = { | |||
208 | MMC_CAP_CMD23, | 208 | MMC_CAP_CMD23, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | static struct dw_mci_drv_data exynos5250_drv_data = { | 211 | static const struct dw_mci_drv_data exynos5250_drv_data = { |
212 | .caps = exynos5250_dwmmc_caps, | 212 | .caps = exynos5250_dwmmc_caps, |
213 | .init = dw_mci_exynos_priv_init, | 213 | .init = dw_mci_exynos_priv_init, |
214 | .setup_clock = dw_mci_exynos_setup_clock, | 214 | .setup_clock = dw_mci_exynos_setup_clock, |
@@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = { | |||
220 | 220 | ||
221 | static const struct of_device_id dw_mci_exynos_match[] = { | 221 | static const struct of_device_id dw_mci_exynos_match[] = { |
222 | { .compatible = "samsung,exynos5250-dw-mshc", | 222 | { .compatible = "samsung,exynos5250-dw-mshc", |
223 | .data = (void *)&exynos5250_drv_data, }, | 223 | .data = &exynos5250_drv_data, }, |
224 | {}, | 224 | {}, |
225 | }; | 225 | }; |
226 | MODULE_DEVICE_TABLE(of, dw_mci_exynos_match); | 226 | MODULE_DEVICE_TABLE(of, dw_mci_exynos_match); |
227 | 227 | ||
228 | int dw_mci_exynos_probe(struct platform_device *pdev) | 228 | int dw_mci_exynos_probe(struct platform_device *pdev) |
229 | { | 229 | { |
230 | struct dw_mci_drv_data *drv_data; | 230 | const struct dw_mci_drv_data *drv_data; |
231 | const struct of_device_id *match; | 231 | const struct of_device_id *match; |
232 | 232 | ||
233 | match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node); | 233 | match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node); |
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index e5957211b171..917936bee5d5 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "dw_mmc.h" | 24 | #include "dw_mmc.h" |
25 | 25 | ||
26 | int dw_mci_pltfm_register(struct platform_device *pdev, | 26 | int dw_mci_pltfm_register(struct platform_device *pdev, |
27 | struct dw_mci_drv_data *drv_data) | 27 | const struct dw_mci_drv_data *drv_data) |
28 | { | 28 | { |
29 | struct dw_mci *host; | 29 | struct dw_mci *host; |
30 | struct resource *regs; | 30 | struct resource *regs; |
diff --git a/drivers/mmc/host/dw_mmc-pltfm.h b/drivers/mmc/host/dw_mmc-pltfm.h index 301f24541fc2..2ac37b81de4d 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.h +++ b/drivers/mmc/host/dw_mmc-pltfm.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define _DW_MMC_PLTFM_H_ | 13 | #define _DW_MMC_PLTFM_H_ |
14 | 14 | ||
15 | extern int dw_mci_pltfm_register(struct platform_device *pdev, | 15 | extern int dw_mci_pltfm_register(struct platform_device *pdev, |
16 | struct dw_mci_drv_data *drv_data); | 16 | const struct dw_mci_drv_data *drv_data); |
17 | extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev); | 17 | extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev); |
18 | extern const struct dev_pm_ops dw_mci_pltfm_pmops; | 18 | extern const struct dev_pm_ops dw_mci_pltfm_pmops; |
19 | 19 | ||
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index b087f66e30c4..c0667c8af2bd 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c | |||
@@ -435,7 +435,7 @@ static int dw_mci_idmac_init(struct dw_mci *host) | |||
435 | return 0; | 435 | return 0; |
436 | } | 436 | } |
437 | 437 | ||
438 | static struct dw_mci_dma_ops dw_mci_idmac_ops = { | 438 | static const struct dw_mci_dma_ops dw_mci_idmac_ops = { |
439 | .init = dw_mci_idmac_init, | 439 | .init = dw_mci_idmac_init, |
440 | .start = dw_mci_idmac_start_dma, | 440 | .start = dw_mci_idmac_start_dma, |
441 | .stop = dw_mci_idmac_stop_dma, | 441 | .stop = dw_mci_idmac_stop_dma, |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 31416760723c..96531664a061 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
@@ -137,7 +137,7 @@ struct dw_mci { | |||
137 | 137 | ||
138 | dma_addr_t sg_dma; | 138 | dma_addr_t sg_dma; |
139 | void *sg_cpu; | 139 | void *sg_cpu; |
140 | struct dw_mci_dma_ops *dma_ops; | 140 | const struct dw_mci_dma_ops *dma_ops; |
141 | #ifdef CONFIG_MMC_DW_IDMAC | 141 | #ifdef CONFIG_MMC_DW_IDMAC |
142 | unsigned int ring_size; | 142 | unsigned int ring_size; |
143 | #else | 143 | #else |
@@ -162,7 +162,7 @@ struct dw_mci { | |||
162 | u16 data_offset; | 162 | u16 data_offset; |
163 | struct device *dev; | 163 | struct device *dev; |
164 | struct dw_mci_board *pdata; | 164 | struct dw_mci_board *pdata; |
165 | struct dw_mci_drv_data *drv_data; | 165 | const struct dw_mci_drv_data *drv_data; |
166 | void *priv; | 166 | void *priv; |
167 | struct clk *biu_clk; | 167 | struct clk *biu_clk; |
168 | struct clk *ciu_clk; | 168 | struct clk *ciu_clk; |