| .. | .. |
|---|
| 46 | 46 | |
|---|
| 47 | 47 | static int of_bus_pci_match(struct device_node *np) |
|---|
| 48 | 48 | { |
|---|
| 49 | | - if (!strcmp(np->name, "pci")) { |
|---|
| 49 | + if (of_node_name_eq(np, "pci")) { |
|---|
| 50 | 50 | const char *model = of_get_property(np, "model", NULL); |
|---|
| 51 | 51 | |
|---|
| 52 | 52 | if (model && !strcmp(model, "SUNW,simba")) |
|---|
| .. | .. |
|---|
| 77 | 77 | /* Treat PCI busses lacking ranges property just like |
|---|
| 78 | 78 | * simba. |
|---|
| 79 | 79 | */ |
|---|
| 80 | | - if (!strcmp(np->name, "pci")) { |
|---|
| 80 | + if (of_node_name_eq(np, "pci")) { |
|---|
| 81 | 81 | if (!of_find_property(np, "ranges", NULL)) |
|---|
| 82 | 82 | return 1; |
|---|
| 83 | 83 | } |
|---|
| .. | .. |
|---|
| 170 | 170 | */ |
|---|
| 171 | 171 | static int of_bus_fhc_match(struct device_node *np) |
|---|
| 172 | 172 | { |
|---|
| 173 | | - return !strcmp(np->name, "fhc") || |
|---|
| 174 | | - !strcmp(np->name, "central"); |
|---|
| 173 | + return of_node_name_eq(np, "fhc") || |
|---|
| 174 | + of_node_name_eq(np, "central"); |
|---|
| 175 | 175 | } |
|---|
| 176 | 176 | |
|---|
| 177 | 177 | #define of_bus_fhc_count_cells of_bus_sbus_count_cells |
|---|
| .. | .. |
|---|
| 295 | 295 | * But, we should still pass the translation work up |
|---|
| 296 | 296 | * to the SBUS itself. |
|---|
| 297 | 297 | */ |
|---|
| 298 | | - if (!strcmp(pp->name, "dma") || |
|---|
| 299 | | - !strcmp(pp->name, "espdma") || |
|---|
| 300 | | - !strcmp(pp->name, "ledma") || |
|---|
| 301 | | - !strcmp(pp->name, "lebuffer")) |
|---|
| 298 | + if (of_node_name_eq(pp, "dma") || |
|---|
| 299 | + of_node_name_eq(pp, "espdma") || |
|---|
| 300 | + of_node_name_eq(pp, "ledma") || |
|---|
| 301 | + of_node_name_eq(pp, "lebuffer")) |
|---|
| 302 | 302 | return 0; |
|---|
| 303 | 303 | |
|---|
| 304 | 304 | /* Similarly for all PCI bridges, if we get this far |
|---|
| 305 | 305 | * it lacks a ranges property, and this will include |
|---|
| 306 | 306 | * cases like Simba. |
|---|
| 307 | 307 | */ |
|---|
| 308 | | - if (!strcmp(pp->name, "pci")) |
|---|
| 308 | + if (of_node_name_eq(pp, "pci")) |
|---|
| 309 | 309 | return 0; |
|---|
| 310 | 310 | |
|---|
| 311 | 311 | return 1; |
|---|
| .. | .. |
|---|
| 341 | 341 | |
|---|
| 342 | 342 | /* Prevent overrunning the op->resources[] array. */ |
|---|
| 343 | 343 | if (num_reg > PROMREG_MAX) { |
|---|
| 344 | | - printk(KERN_WARNING "%s: Too many regs (%d), " |
|---|
| 344 | + printk(KERN_WARNING "%pOF: Too many regs (%d), " |
|---|
| 345 | 345 | "limiting to %d.\n", |
|---|
| 346 | | - op->dev.of_node->full_name, num_reg, PROMREG_MAX); |
|---|
| 346 | + op->dev.of_node, num_reg, PROMREG_MAX); |
|---|
| 347 | 347 | num_reg = PROMREG_MAX; |
|---|
| 348 | 348 | } |
|---|
| 349 | 349 | |
|---|
| .. | .. |
|---|
| 401 | 401 | memset(r, 0, sizeof(*r)); |
|---|
| 402 | 402 | |
|---|
| 403 | 403 | if (of_resource_verbose) |
|---|
| 404 | | - printk("%s reg[%d] -> %llx\n", |
|---|
| 405 | | - op->dev.of_node->full_name, index, |
|---|
| 404 | + printk("%pOF reg[%d] -> %llx\n", |
|---|
| 405 | + op->dev.of_node, index, |
|---|
| 406 | 406 | result); |
|---|
| 407 | 407 | |
|---|
| 408 | 408 | if (result != OF_BAD_ADDR) { |
|---|
| .. | .. |
|---|
| 413 | 413 | r->end = result + size - 1; |
|---|
| 414 | 414 | r->flags = flags; |
|---|
| 415 | 415 | } |
|---|
| 416 | | - r->name = op->dev.of_node->name; |
|---|
| 416 | + r->name = op->dev.of_node->full_name; |
|---|
| 417 | 417 | } |
|---|
| 418 | 418 | } |
|---|
| 419 | 419 | |
|---|
| .. | .. |
|---|
| 548 | 548 | dp->irq_trans->data); |
|---|
| 549 | 549 | |
|---|
| 550 | 550 | if (of_irq_verbose) |
|---|
| 551 | | - printk("%s: direct translate %x --> %x\n", |
|---|
| 552 | | - dp->full_name, orig_irq, irq); |
|---|
| 551 | + printk("%pOF: direct translate %x --> %x\n", |
|---|
| 552 | + dp, orig_irq, irq); |
|---|
| 553 | 553 | |
|---|
| 554 | 554 | goto out; |
|---|
| 555 | 555 | } |
|---|
| .. | .. |
|---|
| 579 | 579 | &irq); |
|---|
| 580 | 580 | |
|---|
| 581 | 581 | if (of_irq_verbose) |
|---|
| 582 | | - printk("%s: Apply [%s:%x] imap --> [%s:%x]\n", |
|---|
| 583 | | - op->dev.of_node->full_name, |
|---|
| 584 | | - pp->full_name, this_orig_irq, |
|---|
| 585 | | - of_node_full_name(iret), irq); |
|---|
| 582 | + printk("%pOF: Apply [%pOF:%x] imap --> [%pOF:%x]\n", |
|---|
| 583 | + op->dev.of_node, |
|---|
| 584 | + pp, this_orig_irq, iret, irq); |
|---|
| 586 | 585 | |
|---|
| 587 | 586 | if (!iret) |
|---|
| 588 | 587 | break; |
|---|
| .. | .. |
|---|
| 592 | 591 | break; |
|---|
| 593 | 592 | } |
|---|
| 594 | 593 | } else { |
|---|
| 595 | | - if (!strcmp(pp->name, "pci")) { |
|---|
| 594 | + if (of_node_name_eq(pp, "pci")) { |
|---|
| 596 | 595 | unsigned int this_orig_irq = irq; |
|---|
| 597 | 596 | |
|---|
| 598 | 597 | irq = pci_irq_swizzle(dp, pp, irq); |
|---|
| 599 | 598 | if (of_irq_verbose) |
|---|
| 600 | | - printk("%s: PCI swizzle [%s] " |
|---|
| 599 | + printk("%pOF: PCI swizzle [%pOF] " |
|---|
| 601 | 600 | "%x --> %x\n", |
|---|
| 602 | | - op->dev.of_node->full_name, |
|---|
| 603 | | - pp->full_name, this_orig_irq, |
|---|
| 601 | + op->dev.of_node, |
|---|
| 602 | + pp, this_orig_irq, |
|---|
| 604 | 603 | irq); |
|---|
| 605 | 604 | |
|---|
| 606 | 605 | } |
|---|
| .. | .. |
|---|
| 619 | 618 | irq = ip->irq_trans->irq_build(op->dev.of_node, irq, |
|---|
| 620 | 619 | ip->irq_trans->data); |
|---|
| 621 | 620 | if (of_irq_verbose) |
|---|
| 622 | | - printk("%s: Apply IRQ trans [%s] %x --> %x\n", |
|---|
| 623 | | - op->dev.of_node->full_name, ip->full_name, orig_irq, irq); |
|---|
| 621 | + printk("%pOF: Apply IRQ trans [%pOF] %x --> %x\n", |
|---|
| 622 | + op->dev.of_node, ip, orig_irq, irq); |
|---|
| 624 | 623 | |
|---|
| 625 | 624 | out: |
|---|
| 626 | 625 | nid = of_node_to_nid(dp); |
|---|
| .. | .. |
|---|
| 656 | 655 | |
|---|
| 657 | 656 | /* Prevent overrunning the op->irqs[] array. */ |
|---|
| 658 | 657 | if (op->archdata.num_irqs > PROMINTR_MAX) { |
|---|
| 659 | | - printk(KERN_WARNING "%s: Too many irqs (%d), " |
|---|
| 658 | + printk(KERN_WARNING "%pOF: Too many irqs (%d), " |
|---|
| 660 | 659 | "limiting to %d.\n", |
|---|
| 661 | | - dp->full_name, op->archdata.num_irqs, PROMINTR_MAX); |
|---|
| 660 | + dp, op->archdata.num_irqs, PROMINTR_MAX); |
|---|
| 662 | 661 | op->archdata.num_irqs = PROMINTR_MAX; |
|---|
| 663 | 662 | } |
|---|
| 664 | 663 | memcpy(op->archdata.irqs, irq, op->archdata.num_irqs * 4); |
|---|
| .. | .. |
|---|
| 680 | 679 | op->dev.dma_mask = &op->dev.coherent_dma_mask; |
|---|
| 681 | 680 | |
|---|
| 682 | 681 | if (of_device_register(op)) { |
|---|
| 683 | | - printk("%s: Could not register of device.\n", |
|---|
| 684 | | - dp->full_name); |
|---|
| 682 | + printk("%pOF: Could not register of device.\n", dp); |
|---|
| 685 | 683 | kfree(op); |
|---|
| 686 | 684 | op = NULL; |
|---|
| 687 | 685 | } |
|---|