]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/libahci_platform.c
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[karo-tx-linux.git] / drivers / ata / libahci_platform.c
index 3a5b4ed25a4f81a5ecb21140a1116363a3657f88..b0077589f065889318bf92c564786db1d8171c6e 100644 (file)
@@ -250,8 +250,13 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev)
        if (IS_ERR(hpriv->phy)) {
                rc = PTR_ERR(hpriv->phy);
                switch (rc) {
-               case -ENODEV:
                case -ENOSYS:
+                       /* No PHY support. Check if PHY is required. */
+                       if (of_find_property(dev->of_node, "phys", NULL)) {
+                               dev_err(dev, "couldn't get sata-phy: ENOSYS\n");
+                               goto err_out;
+                       }
+               case -ENODEV:
                        /* continue normally */
                        hpriv->phy = NULL;
                        break;