From: Brian Norris <computersforpeace@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: artem.bityutskiy@linux.intel.com, gsi@denx.de,
rob.herring@calxeda.com, yongjun_wei@trendmicro.com.cn,
wfp5p@virginia.edu, linux-mtd@lists.infradead.org,
grant.likely@linaro.org, agust@denx.de, shijie8@gmail.com,
dwmw2@infradead.org
Subject: Re: [PATCH] mtd: mpc5121_nfc: drop devm_free_irq of devm_ allocated irq
Date: Tue, 26 Nov 2013 15:54:01 -0800 [thread overview]
Message-ID: <20131126235401.GO9468@ld-irv-0074.broadcom.com> (raw)
In-Reply-To: <CAPgLHd8G-uaG3a7DfA-eAhcdKD3yXzpCuQJ2c8qFe0412pQX2Q@mail.gmail.com>
On Wed, Sep 25, 2013 at 03:40:38PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> The devm_request_irq function allocates irq that is released
> when a driver detaches. Thus, there is no reason to explicitly
> call devm_free_irq in probe or remove functions.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/mtd/nand/mpc5121_nfc.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
> index 3c60a00..7df37f0 100644
> --- a/drivers/mtd/nand/mpc5121_nfc.c
> +++ b/drivers/mtd/nand/mpc5121_nfc.c
> @@ -838,7 +835,6 @@ static int mpc5121_nfc_remove(struct platform_device *op)
> struct mpc5121_nfc_prv *prv = chip->priv;
>
> nand_release(mtd);
> - devm_free_irq(dev, prv->irq, mtd);
> mpc5121_nfc_free(dev, mtd);
>
> return 0;
>
Just noticed a new warning after this hunk:
drivers/mtd/nand/mpc5121_nfc.c:837:26: warning: unused variable 'prv' [-Wunused-variable]
I'm squashing in the following diff and re-pushing to l2-mtd.git (no
action is required from you).
Thanks,
Brian
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index 5865995..435f684 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -834,7 +834,6 @@ static int mpc5121_nfc_remove(struct platform_device *op)
struct device *dev = &op->dev;
struct mtd_info *mtd = dev_get_drvdata(dev);
struct nand_chip *chip = mtd->priv;
- struct mpc5121_nfc_prv *prv = chip->priv;
nand_release(mtd);
mpc5121_nfc_free(dev, mtd);
next prev parent reply other threads:[~2013-11-26 23:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 7:40 [PATCH] mtd: mpc5121_nfc: drop devm_free_irq of devm_ allocated irq Wei Yongjun
2013-11-26 23:27 ` Brian Norris
2013-11-26 23:54 ` Brian Norris [this message]
2013-11-27 0:20 ` Brian Norris
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=20131126235401.GO9468@ld-irv-0074.broadcom.com \
--to=computersforpeace@gmail.com \
--cc=agust@denx.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=grant.likely@linaro.org \
--cc=gsi@denx.de \
--cc=linux-mtd@lists.infradead.org \
--cc=rob.herring@calxeda.com \
--cc=shijie8@gmail.com \
--cc=weiyj.lk@gmail.com \
--cc=wfp5p@virginia.edu \
--cc=yongjun_wei@trendmicro.com.cn \
/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