[PATCH 3/4] MMC: S3C24XX: Fix s3c2410_dma_request() return code check.

Cesar Eduardo Barros cesarb at cesarb.net
Sun Aug 10 01:42:07 CEST 2008

From: Ben Dooks <ben-linux at fluff.org>

The driver should be checking for a negative error code from
s3c2410_dma_request(), not non-zero. Newer kernels now return
the DMA channel number that was allocated by the request.

Signed-off-by: Ben Dooks <ben-linux at fluff.org>
Signed-off-by: Pierre Ossman <drzeus at drzeus.cx>
(cherry picked from commit 3886ff5f63f33c801ed3af265ac0df20d3a8dcf5)
 drivers/mmc/host/s3cmci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 107847a..ffba0f9 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1230,7 +1230,7 @@ static int s3cmci_probe(struct platform_device *pdev, int is2440)
-	if (s3c2410_dma_request(host->dma, &s3cmci_dma_client, NULL)) {
+	if (s3c2410_dma_request(host->dma, &s3cmci_dma_client, NULL) < 0) {
 		dev_err(&pdev->dev, "unable to get DMA channel.\n");
 		ret = -EBUSY;
 		goto probe_free_irq;

More information about the openmoko-kernel mailing list