mmc: sdhci-msm: Fix slot indexing in driver

Fix slot indexing in driver for mmc and sdcard per
new indexing in dt.

Change-Id: Ie960cd9c1a616c1a9d98aa862a3944515d184628
Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
This commit is contained in:
Ram Prakash Gupta 2022-01-13 13:12:36 +05:30 • committed by Sarthak Garg
commit 9aac0330f0

View file

@ -4301,10 +4301,10 @@ static int sdhci_msm_probe(struct platform_device *pdev)
if (pdev->dev.of_node) {
ret = of_alias_get_id(pdev->dev.of_node, "sdhc");
if (ret <= 0)
if (ret < 0)
dev_err(&pdev->dev, "get slot index failed %d\n", ret);
else if (ret <= 2)
sdhci_slot[ret-1] = msm_host;
else if (ret <= 1)
sdhci_slot[ret] = msm_host;
}
/*