From: Julia Lawall <julia@diku.dk>
To: Chris Ball <cjb@laptop.org>
Cc: kernel-janitors@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Linus Walleij <linus.walleij@stericsson.com>,
Marek Vasut <marek.vasut@gmail.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] drivers/mmc/host/pxamci.c: Convert release_resource to release_mem_region
Date: Tue, 22 Mar 2011 18:14:55 +0100 [thread overview]
Message-ID: <1300814095-25278-3-git-send-email-julia@diku.dk> (raw)
Request_mem_region should be used with release_mem_region, not
release_resource.
A semantic patch that partially fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@b@
expression x,E;
@@
x = request_mem_region(x->start,...)
... when != release_mem_region(x->start,...)
when != x = E
(
- release_resource(x);
- kfree(x);
+ release_mem_region(x->start,resource_size(x));
|
?- release_resource(x);
+ release_mem_region(x->start,resource_size(x));
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/mmc/host/pxamci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 7257738..b6e7e64 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -774,7 +774,7 @@ err_gpio_ro:
}
if (mmc)
mmc_free_host(mmc);
- release_resource(r);
+ release_mem_region(r->start, resource_size(r));
return ret;
}
@@ -824,7 +824,7 @@ static int pxamci_remove(struct platform_device *pdev)
clk_put(host->clk);
- release_resource(host->res);
+ release_mem_region(host->res->start, resource_size(host->res));
mmc_free_host(mmc);
}
reply other threads:[~2011-03-22 17:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300814095-25278-3-git-send-email-julia@diku.dk \
--to=julia@diku.dk \
--cc=akpm@linux-foundation.org \
--cc=cjb@laptop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®