public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Alchemy: add missing platform_set_drvdata() in au1550nd_probe()
@ 2013-11-11  6:18 Wei Yongjun
  2013-11-26 23:50 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2013-11-11  6:18 UTC (permalink / raw)
  To: dwmw2, wfp5p, artem.bityutskiy, jg1.han, computersforpeace
  Cc: yongjun_wei, linux-mtd, linux-kernel

From: Wei Yongjun <yongjun_wei@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@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:

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-17  8:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11  6:18 [PATCH] MIPS: Alchemy: add missing platform_set_drvdata() in au1550nd_probe() Wei Yongjun
2013-11-26 23:50 ` Brian Norris
2013-11-27  0:14   ` Jingoo Han
2013-11-27  3:35     ` Brian Norris
2013-12-17  8:21       ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox