mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
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>
This commit is contained in:
parent
517cb9f1bb
commit
8e2b36ea6e
@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = {
|
||||
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,
|
||||
.init = dw_mci_exynos_priv_init,
|
||||
.setup_clock = dw_mci_exynos_setup_clock,
|
||||
@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = {
|
||||
|
||||
static const struct of_device_id dw_mci_exynos_match[] = {
|
||||
{ .compatible = "samsung,exynos5250-dw-mshc",
|
||||
.data = (void *)&exynos5250_drv_data, },
|
||||
.data = &exynos5250_drv_data, },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);
|
||||
|
||||
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;
|
||||
|
||||
match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "dw_mmc.h"
|
||||
|
||||
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 resource *regs;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define _DW_MMC_PLTFM_H_
|
||||
|
||||
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 const struct dev_pm_ops dw_mci_pltfm_pmops;
|
||||
|
||||
|
@ -435,7 +435,7 @@ static int dw_mci_idmac_init(struct dw_mci *host)
|
||||
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,
|
||||
.start = dw_mci_idmac_start_dma,
|
||||
.stop = dw_mci_idmac_stop_dma,
|
||||
|
@ -137,7 +137,7 @@ struct dw_mci {
|
||||
|
||||
dma_addr_t sg_dma;
|
||||
void *sg_cpu;
|
||||
struct dw_mci_dma_ops *dma_ops;
|
||||
const struct dw_mci_dma_ops *dma_ops;
|
||||
#ifdef CONFIG_MMC_DW_IDMAC
|
||||
unsigned int ring_size;
|
||||
#else
|
||||
@ -162,7 +162,7 @@ struct dw_mci {
|
||||
u16 data_offset;
|
||||
struct device *dev;
|
||||
struct dw_mci_board *pdata;
|
||||
struct dw_mci_drv_data *drv_data;
|
||||
const struct dw_mci_drv_data *drv_data;
|
||||
void *priv;
|
||||
struct clk *biu_clk;
|
||||
struct clk *ciu_clk;
|
||||
|
Loading…
Reference in New Issue
Block a user