Ver Fonte

mtd: au1550nd: add missing platform_set_drvdata()

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>
Wei Yongjun há 11 anos atrás
pai
commit
a1d7994e63
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      drivers/mtd/nand/au1550nd.c

+ 2 - 0
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);
 	mtd_device_register(&ctx->info, pd->parts, pd->num_parts);
 
 
+	platform_set_drvdata(pdev, ctx);
+
 	return 0;
 	return 0;
 
 
 out3:
 out3: