提交 a55196ef 编写于 作者: B Benjamin Gaignard 提交者: Lee Jones

mfd: fsl-imx25: Use devm_of_platform_populate()

Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.
Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 2eb131ef
...@@ -129,7 +129,6 @@ static void mx25_tsadc_setup_clk(struct platform_device *pdev, ...@@ -129,7 +129,6 @@ static void mx25_tsadc_setup_clk(struct platform_device *pdev,
static int mx25_tsadc_probe(struct platform_device *pdev) static int mx25_tsadc_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct mx25_tsadc *tsadc; struct mx25_tsadc *tsadc;
struct resource *res; struct resource *res;
int ret; int ret;
...@@ -178,9 +177,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev) ...@@ -178,9 +177,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, tsadc); platform_set_drvdata(pdev, tsadc);
of_platform_populate(np, NULL, NULL, dev); return devm_of_platform_populate(dev);
return 0;
} }
static const struct of_device_id mx25_tsadc_ids[] = { static const struct of_device_id mx25_tsadc_ids[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册