X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fphy%2Fphy-uclass.c;h=db7f39cd0b4598ad14aedb9bb6eebdd8c82c9d81;hb=5575f79bdaa824a90747d5a3d063b5219521b066;hp=1fded5ebf42f9d7856415a7aa4ac49cfc8bbf6bb;hpb=5a2b6778fac98f2cb9ee1e7e6b98cd88d18dcbb9;p=platform%2Fkernel%2Fu-boot.git diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c index 1fded5e..db7f39c 100644 --- a/drivers/phy/phy-uclass.c +++ b/drivers/phy/phy-uclass.c @@ -8,6 +8,7 @@ #include #include #include +#include static inline struct phy_ops *phy_dev_ops(struct udevice *dev) { @@ -117,7 +118,7 @@ int generic_phy_init(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -128,7 +129,7 @@ int generic_phy_reset(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -139,7 +140,7 @@ int generic_phy_exit(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -150,7 +151,7 @@ int generic_phy_power_on(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -161,7 +162,7 @@ int generic_phy_power_off(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev);