forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 072de836f53be56a70cecf70b43ae43b7ce17376
kernel/drivers/misc/cxl/pci.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * 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.
84 */
95
106 #include <linux/pci_regs.h>
....@@ -1718,7 +1714,6 @@
17181714 {
17191715 struct device_node *np;
17201716 int depth = 0;
1721
- const __be32 *prop;
17221717
17231718 if (!(np = pci_device_to_OF_node(dev))) {
17241719 pr_err("cxl: np = NULL\n");
....@@ -1727,8 +1722,7 @@
17271722 of_node_get(np);
17281723 while (np) {
17291724 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"))
17321726 break;
17331727 depth++;
17341728 }