| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* Applied Micro X-Gene SoC Ethernet Driver |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright (c) 2014, Applied Micro Circuits Corporation |
|---|
| 4 | 5 | * Authors: Iyappan Subramanian <isubramanian@apm.com> |
|---|
| 5 | 6 | * Keyur Chudgar <kchudgar@apm.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 8 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 9 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 10 | | - * option) any later version. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 19 | 7 | */ |
|---|
| 20 | 8 | |
|---|
| 21 | 9 | #include "xgene_enet_main.h" |
|---|
| .. | .. |
|---|
| 472 | 460 | } |
|---|
| 473 | 461 | } else { |
|---|
| 474 | 462 | #ifdef CONFIG_ACPI |
|---|
| 475 | | - if (acpi_has_method(ACPI_HANDLE(&p->pdev->dev), "_RST")) |
|---|
| 476 | | - acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev), |
|---|
| 477 | | - "_RST", NULL, NULL); |
|---|
| 478 | | - else if (acpi_has_method(ACPI_HANDLE(&p->pdev->dev), "_INI")) |
|---|
| 463 | + acpi_status status; |
|---|
| 464 | + |
|---|
| 465 | + status = acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev), |
|---|
| 466 | + "_RST", NULL, NULL); |
|---|
| 467 | + if (ACPI_FAILURE(status)) { |
|---|
| 479 | 468 | acpi_evaluate_object(ACPI_HANDLE(&p->pdev->dev), |
|---|
| 480 | 469 | "_INI", NULL, NULL); |
|---|
| 470 | + } |
|---|
| 481 | 471 | #endif |
|---|
| 482 | 472 | } |
|---|
| 483 | 473 | |
|---|