hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/powerpc/platforms/4xx/pci.c
....@@ -1397,7 +1397,6 @@
13971397 printk(KERN_WARNING "PCIE%d: Link up failed\n", port->index);
13981398
13991399 iounmap(mbase);
1400
- return;
14011400 }
14021401
14031402 static struct ppc4xx_pciex_hwops ppc_476fpe_pcie_hwops __initdata =
....@@ -2079,7 +2078,6 @@
20792078 const u32 *pval;
20802079 int portno;
20812080 unsigned int dcrs;
2082
- const char *val;
20832081
20842082 /* First, proceed to core initialization as we assume there's
20852083 * only one PCIe core in the system
....@@ -2125,10 +2123,9 @@
21252123 * Resulting from this setup this PCIe port will be configured
21262124 * as root-complex or as endpoint.
21272125 */
2128
- val = of_get_property(port->node, "device_type", NULL);
2129
- if (!strcmp(val, "pci-endpoint")) {
2126
+ if (of_node_is_type(port->node, "pci-endpoint")) {
21302127 port->endpoint = 1;
2131
- } else if (!strcmp(val, "pci")) {
2128
+ } else if (of_node_is_type(port->node, "pci")) {
21322129 port->endpoint = 0;
21332130 } else {
21342131 printk(KERN_ERR "PCIE: missing or incorrect device_type for %pOF\n",