amd-xgbe: Use proper DT / ACPI precedence checking
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 30 Sep 2015 13:52:45 +0000 (08:52 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 10:23:22 +0000 (03:23 -0700)
Device tree presence takes precedence over ACPI in the device_* APIs.
The amd-xgbe driver should follow the same precedence. Update the check
on whether to use DT / ACPI to follow this.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-main.c

index e83bd76abce66fd6623e3b05944b581c1027c97e..7dd893331785ebce1740280dfdee1acb13de0a52 100644 (file)
@@ -371,7 +371,7 @@ static int xgbe_probe(struct platform_device *pdev)
        set_bit(XGBE_DOWN, &pdata->dev_state);
 
        /* Check if we should use ACPI or DT */
-       pdata->use_acpi = (!pdata->adev || acpi_disabled) ? 0 : 1;
+       pdata->use_acpi = dev->of_node ? 0 : 1;
 
        phy_pdev = xgbe_get_phy_pdev(pdata);
        if (!phy_pdev) {