diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-04-07 00:23:38 -0400 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2015-05-11 12:12:27 -0400 |
commit | 33f434d283a27116fb358ae5bc3b42967c12f85a (patch) | |
tree | d713eba563c8f01adc146e1e02ac872d0efa1ffb /drivers/phy/phy-miphy365x.c | |
parent | 5bea496820cdcb0f6711741ba663ccfe78ac4dbf (diff) |
phy: core: Check requested PHY status in _of_phy_get()
This is a common checking in various drivers, so move the checking to
_of_phy_get().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/phy-miphy365x.c')
-rw-r--r-- | drivers/phy/phy-miphy365x.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c index ba6993da91fe..0ff354d6e183 100644 --- a/drivers/phy/phy-miphy365x.c +++ b/drivers/phy/phy-miphy365x.c | |||
@@ -476,11 +476,6 @@ static struct phy *miphy365x_xlate(struct device *dev, | |||
476 | struct device_node *phynode = args->np; | 476 | struct device_node *phynode = args->np; |
477 | int ret, index; | 477 | int ret, index; |
478 | 478 | ||
479 | if (!of_device_is_available(phynode)) { | ||
480 | dev_warn(dev, "Requested PHY is disabled\n"); | ||
481 | return ERR_PTR(-ENODEV); | ||
482 | } | ||
483 | |||
484 | if (args->args_count != 1) { | 479 | if (args->args_count != 1) { |
485 | dev_err(dev, "Invalid number of cells in 'phy' property\n"); | 480 | dev_err(dev, "Invalid number of cells in 'phy' property\n"); |
486 | return ERR_PTR(-EINVAL); | 481 | return ERR_PTR(-EINVAL); |