aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-08 09:26:11 -0500
committerChris Ball <cjb@laptop.org>2012-12-06 13:54:42 -0500
commite95baf132f9709b86721a562210403473ef72249 (patch)
tree3d41a330ae4ebd895f841bfacc19bedc0d438d17 /drivers/mmc
parentd6a20debf4d2df13843e8d9b8d97d217dc1c15d5 (diff)
mmc: dw_mmc: fix more const pointer warnings
The patch "dw_mmc: fix multiple drv_data NULL dereferences" has unfortunately clashed with my "mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end" patch, causing new warnings to appear. This should hopefully fix the issue for good. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c0667c8af2bd..5b4134811c90 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -232,7 +232,7 @@ static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command *cmd)
232{ 232{
233 struct mmc_data *data; 233 struct mmc_data *data;
234 struct dw_mci_slot *slot = mmc_priv(mmc); 234 struct dw_mci_slot *slot = mmc_priv(mmc);
235 struct dw_mci_drv_data *drv_data = slot->host->drv_data; 235 const struct dw_mci_drv_data *drv_data = slot->host->drv_data;
236 u32 cmdr; 236 u32 cmdr;
237 cmd->error = -EINPROGRESS; 237 cmd->error = -EINPROGRESS;
238 238
@@ -773,7 +773,7 @@ static void dw_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
773static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) 773static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
774{ 774{
775 struct dw_mci_slot *slot = mmc_priv(mmc); 775 struct dw_mci_slot *slot = mmc_priv(mmc);
776 struct dw_mci_drv_data *drv_data = slot->host->drv_data; 776 const struct dw_mci_drv_data *drv_data = slot->host->drv_data;
777 u32 regs; 777 u32 regs;
778 778
779 /* set default 1 bit mode */ 779 /* set default 1 bit mode */
@@ -1817,7 +1817,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
1817{ 1817{
1818 struct mmc_host *mmc; 1818 struct mmc_host *mmc;
1819 struct dw_mci_slot *slot; 1819 struct dw_mci_slot *slot;
1820 struct dw_mci_drv_data *drv_data = host->drv_data; 1820 const struct dw_mci_drv_data *drv_data = host->drv_data;
1821 int ctrl_id, ret; 1821 int ctrl_id, ret;
1822 u8 bus_width; 1822 u8 bus_width;
1823 1823
@@ -2038,7 +2038,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
2038 struct dw_mci_board *pdata; 2038 struct dw_mci_board *pdata;
2039 struct device *dev = host->dev; 2039 struct device *dev = host->dev;
2040 struct device_node *np = dev->of_node; 2040 struct device_node *np = dev->of_node;
2041 struct dw_mci_drv_data *drv_data = host->drv_data; 2041 const struct dw_mci_drv_data *drv_data = host->drv_data;
2042 int idx, ret; 2042 int idx, ret;
2043 2043
2044 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); 2044 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
@@ -2084,7 +2084,7 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
2084 2084
2085int dw_mci_probe(struct dw_mci *host) 2085int dw_mci_probe(struct dw_mci *host)
2086{ 2086{
2087 struct dw_mci_drv_data *drv_data = host->drv_data; 2087 const struct dw_mci_drv_data *drv_data = host->drv_data;
2088 int width, i, ret = 0; 2088 int width, i, ret = 0;
2089 u32 fifo_size; 2089 u32 fifo_size;
2090 int init_slots = 0; 2090 int init_slots = 0;