| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright 2014 IBM Corp. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or |
|---|
| 5 | | - * modify it under the terms of the GNU General Public License |
|---|
| 6 | | - * as published by the Free Software Foundation; either version |
|---|
| 7 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | |
|---|
| 10 | 6 | #include <linux/pci_regs.h> |
|---|
| .. | .. |
|---|
| 1718 | 1714 | { |
|---|
| 1719 | 1715 | struct device_node *np; |
|---|
| 1720 | 1716 | int depth = 0; |
|---|
| 1721 | | - const __be32 *prop; |
|---|
| 1722 | 1717 | |
|---|
| 1723 | 1718 | if (!(np = pci_device_to_OF_node(dev))) { |
|---|
| 1724 | 1719 | pr_err("cxl: np = NULL\n"); |
|---|
| .. | .. |
|---|
| 1727 | 1722 | of_node_get(np); |
|---|
| 1728 | 1723 | while (np) { |
|---|
| 1729 | 1724 | np = of_get_next_parent(np); |
|---|
| 1730 | | - prop = of_get_property(np, "device_type", NULL); |
|---|
| 1731 | | - if (!prop || strcmp((char *)prop, "pciex")) |
|---|
| 1725 | + if (!of_node_is_type(np, "pciex")) |
|---|
| 1732 | 1726 | break; |
|---|
| 1733 | 1727 | depth++; |
|---|
| 1734 | 1728 | } |
|---|