hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/pci/pci-rt3883.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Ralink RT3662/RT3883 SoC PCI support
34 *
45 * Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org>
56 *
67 * Parts of this file are based on Ralink's 2.6.21 BSP
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License version 2 as published
10
- * by the Free Software Foundation.
118 */
129
1310 #include <linux/types.h>
....@@ -445,8 +442,7 @@
445442
446443 /* find the PCI host bridge child node */
447444 for_each_child_of_node(np, child) {
448
- if (child->type &&
449
- of_node_cmp(child->type, "pci") == 0) {
445
+ if (of_node_is_type(child, "pci")) {
450446 rpc->pci_controller.of_node = child;
451447 break;
452448 }
....@@ -464,8 +460,7 @@
464460 for_each_available_child_of_node(rpc->pci_controller.of_node, child) {
465461 int devfn;
466462
467
- if (!child->type ||
468
- of_node_cmp(child->type, "pci") != 0)
463
+ if (!of_node_is_type(child, "pci"))
469464 continue;
470465
471466 devfn = of_pci_get_devfn(child);