提交 909892a6 编写于 作者: G Grygorii Strashko 提交者: David S. Miller

drivers: net: davinci_mdio: do pm runtime initialization later in probe

Do PM runtime initialization later in probe - this allows to simplify
error handling a bit.
Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a6c5d14f
......@@ -356,14 +356,10 @@ static int davinci_mdio_probe(struct platform_device *pdev)
data->bus->parent = dev;
data->bus->priv = data;
pm_runtime_enable(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);
data->clk = devm_clk_get(dev, "fck");
if (IS_ERR(data->clk)) {
dev_err(dev, "failed to get device clock\n");
ret = PTR_ERR(data->clk);
data->clk = NULL;
goto bail_out;
return PTR_ERR(data->clk);
}
dev_set_drvdata(dev, data);
......@@ -372,10 +368,11 @@ static int davinci_mdio_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
data->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(data->regs)) {
ret = PTR_ERR(data->regs);
goto bail_out;
}
if (IS_ERR(data->regs))
return PTR_ERR(data->regs);
pm_runtime_enable(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);
/* register the mii bus
* Create PHYs from DT only in case if PHY child nodes are explicitly
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册