summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/apm
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-07-17 17:19:11 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-23 12:44:52 +0200
commit977d5ad39f3ea12ac0bd51d75020cea5ecdca235 (patch)
tree6e61db209d8ff689916d8db83c9d2453a1eebb74 /drivers/net/ethernet/apm
parentd72e90f33aa4709ebecc5005562f52335e106a60 (diff)
downloadblackbird-op-linux-977d5ad39f3ea12ac0bd51d75020cea5ecdca235.tar.gz
blackbird-op-linux-977d5ad39f3ea12ac0bd51d75020cea5ecdca235.zip
ACPI: Convert ACPI reference args to generic fwnode reference args
Convert all users of struct acpi_reference_args to more generic fwnode_reference_args. This will 1) avoid an ACPI specific references to device nodes with integer arguments as well as 2) allow making references to nodes other than device nodes in ACPI. As a by-product, convert the fwnode interger arguments to u64. The arguments were 64-bit integers on ACPI but the fwnode arguments were just 32-bit. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/net/ethernet/apm')
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_hw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index 3188f553da35..078a04dc1182 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -836,19 +836,19 @@ static void xgene_enet_adjust_link(struct net_device *ndev)
#ifdef CONFIG_ACPI
static struct acpi_device *acpi_phy_find_device(struct device *dev)
{
- struct acpi_reference_args args;
+ struct fwnode_reference_args args;
struct fwnode_handle *fw_node;
int status;
fw_node = acpi_fwnode_handle(ACPI_COMPANION(dev));
status = acpi_node_get_property_reference(fw_node, "phy-handle", 0,
&args);
- if (ACPI_FAILURE(status)) {
+ if (ACPI_FAILURE(status) || !is_acpi_device_node(args.fwnode)) {
dev_dbg(dev, "No matching phy in ACPI table\n");
return NULL;
}
- return args.adev;
+ return to_acpi_device_node(args.fwnode);
}
#endif
OpenPOWER on IntegriCloud