From: Mikko Perttunen Date: Tue, 17 Jun 2014 12:07:55 +0000 (+0300) Subject: libahci_platform: Fail when PHY required but PHY support disabled X-Git-Tag: omap-for-v3.17/fixes-against-rc2~318^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acbd573354bb7b7b7a3891018a39f4b3976b0c43;p=pandora-kernel.git libahci_platform: Fail when PHY required but PHY support disabled ahci_platform_get_resources handles resource management for platform AHCI drivers, including getting a possible PHY from the device tree. Since not all drivers need a PHY, it ignores -ENODEV and -ENOSYS from devm_get_phy. However, when the PHY subsystem is mistakenly disabled, -ENOSYS can be returned even when a PHY is needed. This patch modifies the -ENOSYS case to check if a "phys" device tree node exists. If it exists, then clearly the PHY subsystem is mistakenly disabled and the driver cannot work, ahci_platform_get_resources will fail and propagate the error. Signed-off-by: Mikko Perttunen Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo --- Reading git-diff-tree failed