aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorFaiz Abbas2020-07-29 07:03:41 +0530
committerLokesh Vutla2020-08-11 20:34:45 +0530
commit7d6f45a2109315740cc0b98c3facad1a239a1bd4 (patch)
treebeef0b4f716b65c0179934663d3d10dcd97b336b /drivers/mmc
parentf3f2018f665d7fee26aa61f7eea2015e5a4e6bcb (diff)
mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded value
The hardcoded array size leads to array overflows with changes in speed modes enum in mmc core. Use MMC_MODES_END for otap_del_sel array declaration to fix this. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/am654_sdhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index cbc531dc535..82abf484e4f 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -75,7 +75,7 @@ struct am654_sdhci_plat {
struct mmc mmc;
struct regmap *base;
bool non_removable;
- u32 otap_del_sel[11];
+ u32 otap_del_sel[MMC_MODES_END];
u32 trm_icp;
u32 drv_strength;
u32 strb_sel;