hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/sparc/kernel/of_device_32.c
....@@ -22,7 +22,7 @@
2222
2323 static int of_bus_pci_match(struct device_node *np)
2424 {
25
- if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) {
25
+ if (of_node_is_type(np, "pci") || of_node_is_type(np, "pciex")) {
2626 /* Do not do PCI specific frobbing if the
2727 * PCI bridge lacks a ranges property. We
2828 * want to pass it through up to the next
....@@ -107,7 +107,7 @@
107107
108108 static int of_bus_ambapp_match(struct device_node *np)
109109 {
110
- return !strcmp(np->type, "ambapp");
110
+ return of_node_is_type(np, "ambapp");
111111 }
112112
113113 static void of_bus_ambapp_count_cells(struct device_node *child,
....@@ -232,10 +232,10 @@
232232 * But, we should still pass the translation work up
233233 * to the SBUS itself.
234234 */
235
- if (!strcmp(pp->name, "dma") ||
236
- !strcmp(pp->name, "espdma") ||
237
- !strcmp(pp->name, "ledma") ||
238
- !strcmp(pp->name, "lebuffer"))
235
+ if (of_node_name_eq(pp, "dma") ||
236
+ of_node_name_eq(pp, "espdma") ||
237
+ of_node_name_eq(pp, "ledma") ||
238
+ of_node_name_eq(pp, "lebuffer"))
239239 return 0;
240240
241241 return 1;
....@@ -324,8 +324,8 @@
324324 memset(r, 0, sizeof(*r));
325325
326326 if (of_resource_verbose)
327
- printk("%s reg[%d] -> %llx\n",
328
- op->dev.of_node->full_name, index,
327
+ printk("%pOF reg[%d] -> %llx\n",
328
+ op->dev.of_node, index,
329329 result);
330330
331331 if (result != OF_BAD_ADDR) {
....@@ -333,7 +333,7 @@
333333 r->end = result + size - 1;
334334 r->flags = flags | ((result >> 32ULL) & 0xffUL);
335335 }
336
- r->name = op->dev.of_node->name;
336
+ r->name = op->dev.of_node->full_name;
337337 }
338338 }
339339
....@@ -386,8 +386,7 @@
386386 op->dev.dma_mask = &op->dev.coherent_dma_mask;
387387
388388 if (of_device_register(op)) {
389
- printk("%s: Could not register of device.\n",
390
- dp->full_name);
389
+ printk("%pOF: Could not register of device.\n", dp);
391390 kfree(op);
392391 op = NULL;
393392 }