mmc: use the generic error number
Use the generic error number instead of specific error number.
If use the generic error number, it can debug more easier.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index d584b0b..1d6d2fd 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -170,7 +170,7 @@
cmd_timeout);
} else {
puts("timeout.\n");
- return COMM_ERR;
+ return -ECOMM;
}
}
time++;
@@ -260,7 +260,7 @@
} else {
printf("%s: Timeout for status update!\n",
__func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
} while ((stat & mask) != mask);
@@ -289,9 +289,9 @@
sdhci_reset(host, SDHCI_RESET_CMD);
sdhci_reset(host, SDHCI_RESET_DATA);
if (stat & SDHCI_INT_TIMEOUT)
- return TIMEOUT;
+ return -ETIMEDOUT;
else
- return COMM_ERR;
+ return -ECOMM;
}
static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)