hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* Applied Micro X-Gene SoC Ethernet Driver
23 *
34 * Copyright (c) 2014, Applied Micro Circuits Corporation
45 * Authors: Iyappan Subramanian <isubramanian@apm.com>
56 * 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/>.
197 */
208
219 #include <linux/of_gpio.h>
....@@ -405,11 +393,11 @@
405393 udelay(5);
406394 } else {
407395 #ifdef CONFIG_ACPI
408
- if (acpi_has_method(ACPI_HANDLE(&pdata->pdev->dev), "_RST")) {
409
- acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev),
410
- "_RST", NULL, NULL);
411
- } else if (acpi_has_method(ACPI_HANDLE(&pdata->pdev->dev),
412
- "_INI")) {
396
+ acpi_status status;
397
+
398
+ status = acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev),
399
+ "_RST", NULL, NULL);
400
+ if (ACPI_FAILURE(status)) {
413401 acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev),
414402 "_INI", NULL, NULL);
415403 }