aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc-k3.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-03-06 00:53:44 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-06 01:20:46 -0500
commit0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70 (patch)
tree439c89ea3c87496c23e167148f2cdbefb6e82b30 /drivers/mmc/host/dw_mmc-k3.c
parentMerge branch 'mvpp2-jumbo-frames-support' (diff)
parentMerge tag 'please-pull-ia64_misc' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux (diff)
downloadlinux-dev-0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70.tar.xz
linux-dev-0f3e9c97eb5a97972b0c0076a5cc01bb142f8e70.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
All of the conflicts were cases of overlapping changes. In net/core/devlink.c, we have to make care that the resouce size_params have become a struct member rather than a pointer to such an object. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-k3.c')
-rw-r--r--drivers/mmc/host/dw_mmc-k3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc-k3.c b/drivers/mmc/host/dw_mmc-k3.c
index 73fd75c3c824..89cdb3d533bb 100644
--- a/drivers/mmc/host/dw_mmc-k3.c
+++ b/drivers/mmc/host/dw_mmc-k3.c
@@ -135,6 +135,9 @@ static int dw_mci_hi6220_parse_dt(struct dw_mci *host)
if (priv->ctrl_id < 0)
priv->ctrl_id = 0;
+ if (priv->ctrl_id >= TIMING_MODE)
+ return -EINVAL;
+
host->priv = priv;
return 0;
}
@@ -207,6 +210,7 @@ static int dw_mci_hi6220_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
static const struct dw_mci_drv_data hi6220_data = {
.caps = dw_mci_hi6220_caps,
+ .num_caps = ARRAY_SIZE(dw_mci_hi6220_caps),
.switch_voltage = dw_mci_hi6220_switch_voltage,
.set_ios = dw_mci_hi6220_set_ios,
.parse_dt = dw_mci_hi6220_parse_dt,