Merge branch 'sched/urgent' into sched/core
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / nand / lpc32xx_mlc.c
index fd1df5e13ae44d77207d19fb492064166bf46525..f4dd2a887ea5da15b0b64c743f9ecb2603035b97 100644 (file)
@@ -696,7 +696,7 @@ static int lpc32xx_nand_probe(struct platform_device *pdev)
        }
        lpc32xx_wp_disable(host);
 
-       host->pdata = pdev->dev.platform_data;
+       host->pdata = dev_get_platdata(&pdev->dev);
 
        nand_chip->priv = host;         /* link the private data structures */
        mtd->priv = nand_chip;
@@ -828,7 +828,6 @@ err_exit3:
 err_exit2:
        clk_disable(host->clk);
        clk_put(host->clk);
-       platform_set_drvdata(pdev, NULL);
 err_exit1:
        lpc32xx_wp_enable(host);
        gpio_free(host->ncfg->wp_gpio);
@@ -851,7 +850,6 @@ static int lpc32xx_nand_remove(struct platform_device *pdev)
 
        clk_disable(host->clk);
        clk_put(host->clk);
-       platform_set_drvdata(pdev, NULL);
 
        lpc32xx_wp_enable(host);
        gpio_free(host->ncfg->wp_gpio);