diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2014-02-17 12:59:25 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-19 00:13:16 +0400 |
commit | 64fe1891696cdef4603b5f2d7c3a846bce8cf42b (patch) | |
tree | 93b9f7f93fa20d351f1a09c847b1e275cfff23a6 /drivers/phy/phy-exynos-dp-video.c | |
parent | b51fbf9fb0c32c1a98f824ab5d6f59b17b39ef9e (diff) | |
download | linux-64fe1891696cdef4603b5f2d7c3a846bce8cf42b.tar.xz |
phy: let phy_provider_register be the last step in registering PHY
Registering phy_provider before creating the PHY can result in PHY
callbacks being invoked which will lead to aborts. In order to avoid this
invoke phy_provider_register after phy_create and phy_set_drvdata.
Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/phy/phy-exynos-dp-video.c')
-rw-r--r-- | drivers/phy/phy-exynos-dp-video.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/phy/phy-exynos-dp-video.c b/drivers/phy/phy-exynos-dp-video.c index 1dbe6ce7b2ce..0786fef842e7 100644 --- a/drivers/phy/phy-exynos-dp-video.c +++ b/drivers/phy/phy-exynos-dp-video.c @@ -76,10 +76,6 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev) if (IS_ERR(state->regs)) return PTR_ERR(state->regs); - phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); - if (IS_ERR(phy_provider)) - return PTR_ERR(phy_provider); - phy = devm_phy_create(dev, &exynos_dp_video_phy_ops, NULL); if (IS_ERR(phy)) { dev_err(dev, "failed to create Display Port PHY\n"); @@ -87,6 +83,10 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev) } phy_set_drvdata(phy, state); + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); + if (IS_ERR(phy_provider)) + return PTR_ERR(phy_provider); + return 0; } |