提交 8e2b36ea 编写于 作者: A Arnd Bergmann 提交者: Chris Ball

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: NArnd Bergmann <arnd@arndb.de>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Will Newton <will.newton@imgtec.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 517cb9f1
...@@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = { ...@@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = {
MMC_CAP_CMD23, MMC_CAP_CMD23,
}; };
static struct dw_mci_drv_data exynos5250_drv_data = { static const struct dw_mci_drv_data exynos5250_drv_data = {
.caps = exynos5250_dwmmc_caps, .caps = exynos5250_dwmmc_caps,
.init = dw_mci_exynos_priv_init, .init = dw_mci_exynos_priv_init,
.setup_clock = dw_mci_exynos_setup_clock, .setup_clock = dw_mci_exynos_setup_clock,
...@@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = { ...@@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = {
static const struct of_device_id dw_mci_exynos_match[] = { static const struct of_device_id dw_mci_exynos_match[] = {
{ .compatible = "samsung,exynos5250-dw-mshc", { .compatible = "samsung,exynos5250-dw-mshc",
.data = (void *)&exynos5250_drv_data, }, .data = &exynos5250_drv_data, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, dw_mci_exynos_match); MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);
int dw_mci_exynos_probe(struct platform_device *pdev) int dw_mci_exynos_probe(struct platform_device *pdev)
{ {
struct dw_mci_drv_data *drv_data; const struct dw_mci_drv_data *drv_data;
const struct of_device_id *match; const struct of_device_id *match;
match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node); match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "dw_mmc.h" #include "dw_mmc.h"
int dw_mci_pltfm_register(struct platform_device *pdev, int dw_mci_pltfm_register(struct platform_device *pdev,
struct dw_mci_drv_data *drv_data) const struct dw_mci_drv_data *drv_data)
{ {
struct dw_mci *host; struct dw_mci *host;
struct resource *regs; struct resource *regs;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define _DW_MMC_PLTFM_H_ #define _DW_MMC_PLTFM_H_
extern int dw_mci_pltfm_register(struct platform_device *pdev, extern int dw_mci_pltfm_register(struct platform_device *pdev,
struct dw_mci_drv_data *drv_data); const struct dw_mci_drv_data *drv_data);
extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev); extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev);
extern const struct dev_pm_ops dw_mci_pltfm_pmops; extern const struct dev_pm_ops dw_mci_pltfm_pmops;
......
...@@ -435,7 +435,7 @@ static int dw_mci_idmac_init(struct dw_mci *host) ...@@ -435,7 +435,7 @@ static int dw_mci_idmac_init(struct dw_mci *host)
return 0; return 0;
} }
static struct dw_mci_dma_ops dw_mci_idmac_ops = { static const struct dw_mci_dma_ops dw_mci_idmac_ops = {
.init = dw_mci_idmac_init, .init = dw_mci_idmac_init,
.start = dw_mci_idmac_start_dma, .start = dw_mci_idmac_start_dma,
.stop = dw_mci_idmac_stop_dma, .stop = dw_mci_idmac_stop_dma,
......
...@@ -137,7 +137,7 @@ struct dw_mci { ...@@ -137,7 +137,7 @@ struct dw_mci {
dma_addr_t sg_dma; dma_addr_t sg_dma;
void *sg_cpu; void *sg_cpu;
struct dw_mci_dma_ops *dma_ops; const struct dw_mci_dma_ops *dma_ops;
#ifdef CONFIG_MMC_DW_IDMAC #ifdef CONFIG_MMC_DW_IDMAC
unsigned int ring_size; unsigned int ring_size;
#else #else
...@@ -162,7 +162,7 @@ struct dw_mci { ...@@ -162,7 +162,7 @@ struct dw_mci {
u16 data_offset; u16 data_offset;
struct device *dev; struct device *dev;
struct dw_mci_board *pdata; struct dw_mci_board *pdata;
struct dw_mci_drv_data *drv_data; const struct dw_mci_drv_data *drv_data;
void *priv; void *priv;
struct clk *biu_clk; struct clk *biu_clk;
struct clk *ciu_clk; struct clk *ciu_clk;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册