]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drivers: net: Replace acpi_bus_get_device()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 2 Feb 2022 14:19:20 +0000 (15:19 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Feb 2022 16:05:06 +0000 (08:05 -0800)
Replace acpi_bus_get_device() that is going to be dropped with
acpi_fetch_acpi_dev().

No intentional functional impact.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/11918902.O9o76ZdvQC@kreacher
Link: https://lore.kernel.org/r/11920660.O9o76ZdvQC@kreacher
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c
drivers/net/fjes/fjes_main.c
drivers/net/mdio/mdio-xgene.c

index 574a32f23f966b1d72f918ea8e78294551d29f30..2f6484dc186ab14fe0b47e0bd6d01b03e6b56dbf 100644 (file)
@@ -1409,7 +1409,8 @@ static acpi_status bgx_acpi_register_phy(acpi_handle handle,
        struct device *dev = &bgx->pdev->dev;
        struct acpi_device *adev;
 
-       if (acpi_bus_get_device(handle, &adev))
+       adev = acpi_fetch_acpi_dev(handle);
+       if (!adev)
                goto out;
 
        acpi_get_mac_address(dev, adev, bgx->lmac[bgx->acpi_lmac_idx].mac);
index ebd287039a54631aa9a1e2e317a50476dab88315..5805e4a563859bd4e23ad2eca98301ba6eb28f30 100644 (file)
@@ -1514,10 +1514,9 @@ acpi_find_extended_socket_device(acpi_handle obj_handle, u32 level,
 {
        struct acpi_device *device;
        bool *found = context;
-       int result;
 
-       result = acpi_bus_get_device(obj_handle, &device);
-       if (result)
+       device = acpi_fetch_acpi_dev(obj_handle);
+       if (!device)
                return AE_OK;
 
        if (strcmp(acpi_device_hid(device), ACPI_MOTHERBOARD_RESOURCE_HID))
index 7ab4e26db08c265f9a1a2170a6405b15a31d051b..7aafc221b5cf0e8dc0f66eb47050b44ab5e4b2f2 100644 (file)
@@ -285,7 +285,8 @@ static acpi_status acpi_register_phy(acpi_handle handle, u32 lvl,
        const union acpi_object *obj;
        u32 phy_addr;
 
-       if (acpi_bus_get_device(handle, &adev))
+       adev = acpi_fetch_acpi_dev(handle);
+       if (!adev)
                return AE_OK;
 
        if (acpi_dev_get_property(adev, "phy-channel", ACPI_TYPE_INTEGER, &obj))