[PATCH] MIPS: Alchemy: add missing platform_set_drvdata() in au1550nd_probe()

Wei Yongjun weiyj.lk at gmail.com
Mon Nov 11 01:18:29 EST 2013


From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Add missing platform_set_drvdata() in au1550nd_probe(), otherwise
calling platform_get_drvdata() in remove returns NULL.

Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
 drivers/mtd/nand/au1550nd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c
index ae8dd7c..909b673 100644
--- a/drivers/mtd/nand/au1550nd.c
+++ b/drivers/mtd/nand/au1550nd.c
@@ -480,6 +480,8 @@ static int au1550nd_probe(struct platform_device *pdev)
 
 	mtd_device_register(&ctx->info, pd->parts, pd->num_parts);
 
+	platform_set_drvdata(pdev, ctx);
+
 	return 0;
 
 out3:




More information about the linux-mtd mailing list