History

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]

Arnd Bergmann committed 14 years ago

Commit 8e2b36e1 parent 517cb9f5 files · +8 −8Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/mmc/dw_mmc.h+2−2
@@ -137,7 +137,7 @@ struct dw_mci { · 136 unmodified lines
137137
138138 dma_addr_t sg_dma;
139139 void *sg_cpu;
140− struct dw_mci_dma_ops *dma_ops;
140+ const struct dw_mci_dma_ops *dma_ops;
141141 #ifdef CONFIG_MMC_DW_IDMAC
142142 unsigned int ring_size;
143143 #else
@@ -162,7 +162,7 @@ struct dw_mci { · 18 unmodified lines
162162 u16 data_offset;
163163 struct device *dev;
164164 struct dw_mci_board *pdata;
165− struct dw_mci_drv_data *drv_data;
165+ const struct dw_mci_drv_data *drv_data;
166166 void *priv;
167167 struct clk *biu_clk;
168168 struct clk *ciu_clk;