diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-22 16:18:46 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-23 02:46:48 -0400 |
commit | 17b0429dde9ab60f9cee8e07ab28c7dc6cfe6efd (patch) | |
tree | 9f87df1ffbeca4c6f828b7979f2e45ef898a3ef0 /drivers/mmc/host/mmci.c | |
parent | b7e113dc9d52c4a37d2da6fafe77959f3a28eccf (diff) |
mmc: remove custom error codes
Convert the MMC layer to use standard error codes and not its own,
incompatible values.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r-- | drivers/mmc/host/mmci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index be730c0a0352..d53e9a8bdaa2 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -154,11 +154,11 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data, | |||
154 | } | 154 | } |
155 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) { | 155 | if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) { |
156 | if (status & MCI_DATACRCFAIL) | 156 | if (status & MCI_DATACRCFAIL) |
157 | data->error = MMC_ERR_BADCRC; | 157 | data->error = -EILSEQ; |
158 | else if (status & MCI_DATATIMEOUT) | 158 | else if (status & MCI_DATATIMEOUT) |
159 | data->error = MMC_ERR_TIMEOUT; | 159 | data->error = -ETIMEDOUT; |
160 | else if (status & (MCI_TXUNDERRUN|MCI_RXOVERRUN)) | 160 | else if (status & (MCI_TXUNDERRUN|MCI_RXOVERRUN)) |
161 | data->error = MMC_ERR_FIFO; | 161 | data->error = -EIO; |
162 | status |= MCI_DATAEND; | 162 | status |= MCI_DATAEND; |
163 | 163 | ||
164 | /* | 164 | /* |
@@ -193,12 +193,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, | |||
193 | cmd->resp[3] = readl(base + MMCIRESPONSE3); | 193 | cmd->resp[3] = readl(base + MMCIRESPONSE3); |
194 | 194 | ||
195 | if (status & MCI_CMDTIMEOUT) { | 195 | if (status & MCI_CMDTIMEOUT) { |
196 | cmd->error = MMC_ERR_TIMEOUT; | 196 | cmd->error = -ETIMEDOUT; |
197 | } else if (status & MCI_CMDCRCFAIL && cmd->flags & MMC_RSP_CRC) { | 197 | } else if (status & MCI_CMDCRCFAIL && cmd->flags & MMC_RSP_CRC) { |
198 | cmd->error = MMC_ERR_BADCRC; | 198 | cmd->error = -EILSEQ; |
199 | } | 199 | } |
200 | 200 | ||
201 | if (!cmd->data || cmd->error != MMC_ERR_NONE) { | 201 | if (!cmd->data || cmd->error) { |
202 | if (host->data) | 202 | if (host->data) |
203 | mmci_stop_data(host); | 203 | mmci_stop_data(host); |
204 | mmci_request_end(host, cmd->mrq); | 204 | mmci_request_end(host, cmd->mrq); |