| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Ralink RT3662/RT3883 SoC PCI support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org> |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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. |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/types.h> |
|---|
| .. | .. |
|---|
| 445 | 442 | |
|---|
| 446 | 443 | /* find the PCI host bridge child node */ |
|---|
| 447 | 444 | 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")) { |
|---|
| 450 | 446 | rpc->pci_controller.of_node = child; |
|---|
| 451 | 447 | break; |
|---|
| 452 | 448 | } |
|---|
| .. | .. |
|---|
| 464 | 460 | for_each_available_child_of_node(rpc->pci_controller.of_node, child) { |
|---|
| 465 | 461 | int devfn; |
|---|
| 466 | 462 | |
|---|
| 467 | | - if (!child->type || |
|---|
| 468 | | - of_node_cmp(child->type, "pci") != 0) |
|---|
| 463 | + if (!of_node_is_type(child, "pci")) |
|---|
| 469 | 464 | continue; |
|---|
| 470 | 465 | |
|---|
| 471 | 466 | devfn = of_pci_get_devfn(child); |
|---|