aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-09-25 03:40:38 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-01-03 14:22:20 -0500
commitafc62baf107355715beaf982513db3355867b29b (patch)
tree6cf39658d4777b6f2629218b8e0caf0392985e8e
parentc23259627c7f60646ac772d159baaf71796eefac (diff)
mtd: mpc5121_nfc: drop devm_free_irq of devm_ allocated irq
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> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/nand/mpc5121_nfc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index 439bc3896418..d744cf798978 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -786,7 +786,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
786 /* Detect NAND chips */ 786 /* Detect NAND chips */
787 if (nand_scan(mtd, be32_to_cpup(chips_no))) { 787 if (nand_scan(mtd, be32_to_cpup(chips_no))) {
788 dev_err(dev, "NAND Flash not found !\n"); 788 dev_err(dev, "NAND Flash not found !\n");
789 devm_free_irq(dev, prv->irq, mtd);
790 retval = -ENXIO; 789 retval = -ENXIO;
791 goto error; 790 goto error;
792 } 791 }
@@ -811,7 +810,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
811 810
812 default: 811 default:
813 dev_err(dev, "Unsupported NAND flash!\n"); 812 dev_err(dev, "Unsupported NAND flash!\n");
814 devm_free_irq(dev, prv->irq, mtd);
815 retval = -ENXIO; 813 retval = -ENXIO;
816 goto error; 814 goto error;
817 } 815 }
@@ -822,7 +820,6 @@ static int mpc5121_nfc_probe(struct platform_device *op)
822 retval = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0); 820 retval = mtd_device_parse_register(mtd, NULL, &ppdata, NULL, 0);
823 if (retval) { 821 if (retval) {
824 dev_err(dev, "Error adding MTD device!\n"); 822 dev_err(dev, "Error adding MTD device!\n");
825 devm_free_irq(dev, prv->irq, mtd);
826 goto error; 823 goto error;
827 } 824 }
828 825
@@ -836,11 +833,8 @@ static int mpc5121_nfc_remove(struct platform_device *op)
836{ 833{
837 struct device *dev = &op->dev; 834 struct device *dev = &op->dev;
838 struct mtd_info *mtd = dev_get_drvdata(dev); 835 struct mtd_info *mtd = dev_get_drvdata(dev);
839 struct nand_chip *chip = mtd->priv;
840 struct mpc5121_nfc_prv *prv = chip->priv;
841 836
842 nand_release(mtd); 837 nand_release(mtd);
843 devm_free_irq(dev, prv->irq, mtd);
844 mpc5121_nfc_free(dev, mtd); 838 mpc5121_nfc_free(dev, mtd);
845 839
846 return 0; 840 return 0;