mtd: au1550nd: add missing platform_set_drvdata()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 11 Nov 2013 06:18:29 +0000 (14:18 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 3 Jan 2014 19:22:24 +0000 (11:22 -0800)
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>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/au1550nd.c

index ae8dd7c4103922fc760786be079b7576ad648893..909b6738ece2e41e264be2906aa4e937a991f0b9 100644 (file)
@@ -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: