Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430877
| From | Grygorii Strashko <grygorii.strashko@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 06/15] drivers: net: davinci_mdio: do pm runtime initialization later in probe |
| Date | 2016-06-24 20:30 +0200 |
| Message-ID | <rNE1A-3iA-51@gated-at.bofh.it> (permalink) |
| References | <rNE1z-3iA-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Do PM runtime initialization later in probe - this allows to simplify
error handling a bit.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/net/ethernet/ti/davinci_mdio.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 4e7c9b9..2e19dd1 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -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
--
2.9.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/15] drivers: net: cpsw: improve runtime pm Grygorii Strashko <grygorii.strashko@ti.com> - 2016-06-24 20:30 +0200 [PATCH v2 05/15] drivers: net: cpsw: ndev: fix accessing to suspended device Grygorii Strashko <grygorii.strashko@ti.com> - 2016-06-24 20:30 +0200 [PATCH v2 04/15] drivers: net: cpsw: ethtool: fix accessing to suspended device Grygorii Strashko <grygorii.strashko@ti.com> - 2016-06-24 20:30 +0200 [PATCH v2 06/15] drivers: net: davinci_mdio: do pm runtime initialization later in probe Grygorii Strashko <grygorii.strashko@ti.com> - 2016-06-24 20:30 +0200 Re: [PATCH v2 00/15] drivers: net: cpsw: improve runtime pm Mugunthan V N <mugunthanvnm@ti.com> - 2016-06-27 11:20 +0200 Re: [PATCH v2 00/15] drivers: net: cpsw: improve runtime pm David Miller <davem@davemloft.net> - 2016-06-28 15:00 +0200
csiph-web