Check EOPNOTSUPP for disabled helper function as the change in phy core.

Signed-off-by: Inochi Amaoto <[email protected]>
---
 drivers/ata/libahci_platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 6e072d681341..3e8ddbeb49b3 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -371,11 +371,11 @@ static int ahci_platform_get_phy(struct ahci_host_priv 
*hpriv, u32 port,
 
        rc = PTR_ERR(hpriv->phys[port]);
        switch (rc) {
-       case -ENOSYS:
+       case -EOPNOTSUPP:
                /* No PHY support. Check if PHY is required. */
                if (of_property_present(node, "phys")) {
                        dev_err(dev,
-                               "couldn't get PHY in node %pOFn: ENOSYS\n",
+                               "couldn't get PHY in node %pOFn: EOPNOTSUPP\n",
                                node);
                        break;
                }
-- 
2.55.0

Reply via email to