mtd: socrates_nand: Remove redundant dev_set_drvdata

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Nov 13 13:59:04 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=ecb598d0b2ca4897a3962aed7680ee3d28dda6e8
Commit:     ecb598d0b2ca4897a3962aed7680ee3d28dda6e8
Parent:     c69ad0ef2fa58168b9aec7f7d1561c9e43376239
Author:     Sachin Kamat <sachin.kamat at linaro.org>
AuthorDate: Tue Oct 8 15:31:45 2013 +0530
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 6 23:32:50 2013 -0800

    mtd: socrates_nand: Remove redundant dev_set_drvdata
    
    Driver core will set the driver data to NULL upon detach or
    probe failure.
    
    Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/socrates_nand.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
index 09dde7d..f44c7c8 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/socrates_nand.c
@@ -211,7 +211,6 @@ static int socrates_nand_probe(struct platform_device *ofdev)
 	nand_release(mtd);
 
 out:
-	dev_set_drvdata(&ofdev->dev, NULL);
 	iounmap(host->io_base);
 	kfree(host);
 	return res;
@@ -227,7 +226,6 @@ static int socrates_nand_remove(struct platform_device *ofdev)
 
 	nand_release(mtd);
 
-	dev_set_drvdata(&ofdev->dev, NULL);
 	iounmap(host->io_base);
 	kfree(host);
 



More information about the linux-mtd-cvs mailing list