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/omap.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/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 0cf97edc5f58..60a67dfcda6a 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -263,7 +263,7 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) | |||
263 | enum dma_data_direction dma_data_dir; | 263 | enum dma_data_direction dma_data_dir; |
264 | 264 | ||
265 | BUG_ON(host->dma_ch < 0); | 265 | BUG_ON(host->dma_ch < 0); |
266 | if (data->error != MMC_ERR_NONE) | 266 | if (data->error) |
267 | omap_stop_dma(host->dma_ch); | 267 | omap_stop_dma(host->dma_ch); |
268 | /* Release DMA channel lazily */ | 268 | /* Release DMA channel lazily */ |
269 | mod_timer(&host->dma_timer, jiffies + HZ); | 269 | mod_timer(&host->dma_timer, jiffies + HZ); |
@@ -368,7 +368,7 @@ mmc_omap_cmd_done(struct mmc_omap_host *host, struct mmc_command *cmd) | |||
368 | } | 368 | } |
369 | } | 369 | } |
370 | 370 | ||
371 | if (host->data == NULL || cmd->error != MMC_ERR_NONE) { | 371 | if (host->data == NULL || cmd->error) { |
372 | host->mrq = NULL; | 372 | host->mrq = NULL; |
373 | clk_disable(host->fclk); | 373 | clk_disable(host->fclk); |
374 | mmc_request_done(host->mmc, cmd->mrq); | 374 | mmc_request_done(host->mmc, cmd->mrq); |
@@ -475,14 +475,14 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) | |||
475 | if (status & OMAP_MMC_STAT_DATA_TOUT) { | 475 | if (status & OMAP_MMC_STAT_DATA_TOUT) { |
476 | dev_dbg(mmc_dev(host->mmc), "data timeout\n"); | 476 | dev_dbg(mmc_dev(host->mmc), "data timeout\n"); |
477 | if (host->data) { | 477 | if (host->data) { |
478 | host->data->error |= MMC_ERR_TIMEOUT; | 478 | host->data->error = -ETIMEDOUT; |
479 | transfer_error = 1; | 479 | transfer_error = 1; |
480 | } | 480 | } |
481 | } | 481 | } |
482 | 482 | ||
483 | if (status & OMAP_MMC_STAT_DATA_CRC) { | 483 | if (status & OMAP_MMC_STAT_DATA_CRC) { |
484 | if (host->data) { | 484 | if (host->data) { |
485 | host->data->error |= MMC_ERR_BADCRC; | 485 | host->data->error = -EILSEQ; |
486 | dev_dbg(mmc_dev(host->mmc), | 486 | dev_dbg(mmc_dev(host->mmc), |
487 | "data CRC error, bytes left %d\n", | 487 | "data CRC error, bytes left %d\n", |
488 | host->total_bytes_left); | 488 | host->total_bytes_left); |
@@ -504,7 +504,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) | |||
504 | dev_err(mmc_dev(host->mmc), | 504 | dev_err(mmc_dev(host->mmc), |
505 | "command timeout, CMD %d\n", | 505 | "command timeout, CMD %d\n", |
506 | host->cmd->opcode); | 506 | host->cmd->opcode); |
507 | host->cmd->error = MMC_ERR_TIMEOUT; | 507 | host->cmd->error = -ETIMEDOUT; |
508 | end_command = 1; | 508 | end_command = 1; |
509 | } | 509 | } |
510 | } | 510 | } |
@@ -514,7 +514,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) | |||
514 | dev_err(mmc_dev(host->mmc), | 514 | dev_err(mmc_dev(host->mmc), |
515 | "command CRC error (CMD%d, arg 0x%08x)\n", | 515 | "command CRC error (CMD%d, arg 0x%08x)\n", |
516 | host->cmd->opcode, host->cmd->arg); | 516 | host->cmd->opcode, host->cmd->arg); |
517 | host->cmd->error = MMC_ERR_BADCRC; | 517 | host->cmd->error = -EILSEQ; |
518 | end_command = 1; | 518 | end_command = 1; |
519 | } else | 519 | } else |
520 | dev_err(mmc_dev(host->mmc), | 520 | dev_err(mmc_dev(host->mmc), |