diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-07-26 09:20:37 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-27 14:17:55 -0700 |
commit | 85d2c5cde158ce00fe965561cfc57404fbefb0a7 (patch) | |
tree | 28c329d22972c5380f5951c1e60edc2b26d873f5 /drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | |
parent | net: stmmac: Do not request stmmaceth clock (diff) | |
download | linux-dev-85d2c5cde158ce00fe965561cfc57404fbefb0a7.tar.xz linux-dev-85d2c5cde158ce00fe965561cfc57404fbefb0a7.zip |
drivers: net: xgene: Move status variable declaration into CONFIG_ACPI block
When CONFIG_ACPI is unset (arm allyesconfig), status is unused.
drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:383:14: warning:
unused variable 'status' [-Wunused-variable]
acpi_status status;
^
drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c:440:14: warning:
unused variable 'status' [-Wunused-variable]
acpi_status status;
^
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c:697:14: warning: unused
variable 'status' [-Wunused-variable]
acpi_status status;
^
Move the declaration into the CONFIG_ACPI block so that there are no
compiler warnings.
Fixes: 570d785ba46b ("drivers: net: xgene: Remove acpi_has_method() calls")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c index 3b3dc5b25b29..f482ced2cadd 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c @@ -437,7 +437,6 @@ static void xgene_sgmac_tx_disable(struct xgene_enet_pdata *p) static int xgene_enet_reset(struct xgene_enet_pdata *p) { struct device *dev = &p->pdev->dev; - acpi_status status; if (!xgene_ring_mgr_init(p)) return -ENODEV; @@ -461,6 +460,8 @@ static int xgene_enet_reset(struct xgene_enet_pdata *p) } } else { #ifdef CONFIG_ACPI + acpi_status status; + status = acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev), "_RST", NULL, NULL); if (ACPI_FAILURE(status)) { |