From 8e3336b1e4378f7d205af9b25dcc9e645c8a9609 Mon Sep 17 00:00:00 2001 From: Per Forlin Date: Mon, 29 Aug 2011 15:35:59 +0200 Subject: mmc: mmci: simplify err check in mmci_post_request The error condition indicates that mmci_post_request() should cleanup after the mmci_pre_request(). In this case the resources allocated by device_prep_slave_sg() are freed by calling dmaengine_terminate_all(). dma_unmap_sg() should always be performed if the host_cookie is set. Signed-off-by: Per Forlin Acked-by: Linus Walleij Signed-off-by: Chris Ball --- drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mmc/host/mmci.c') diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 56e9a4168264..40e4c055812e 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -529,7 +529,7 @@ static void mmci_post_request(struct mmc_host *mmc, struct mmc_request *mrq, if (chan) { if (err) dmaengine_terminate_all(chan); - if (err || data->host_cookie) + if (data->host_cookie) dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, dir); mrq->data->host_cookie = 0; -- cgit v1.2.3 From a3c76eb9d4a1e68a69dd880cf0bcb8a52418b993 Mon Sep 17 00:00:00 2001 From: Girish K S Date: Tue, 11 Oct 2011 11:44:09 +0530 Subject: mmc: replace printk with appropriate display macro All the files using printk function for displaying kernel messages in the mmc driver have been replaced with corresponding macro. Signed-off-by: Girish K S Signed-off-by: Chris Ball --- drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mmc/host/mmci.c') diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 40e4c055812e..4602771658c0 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -464,7 +464,7 @@ static void mmci_get_next_data(struct mmci_host *host, struct mmc_data *data) struct mmci_host_next *next = &host->next_data; if (data->host_cookie && data->host_cookie != next->cookie) { - printk(KERN_WARNING "[%s] invalid cookie: data->host_cookie %d" + pr_warning("[%s] invalid cookie: data->host_cookie %d" " host->next_data.cookie %d\n", __func__, data->host_cookie, host->next_data.cookie); data->host_cookie = 0; -- cgit v1.2.3