Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] Rename device_is_compatible to of_device_is_compatible

for consistency with other Open Firmware interfaces (and Sparc).

This is just a straight replacement.

This leaves the compatibility define in place.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Stephen Rothwell and committed by
Paul Mackerras
55b61fec d9333afd

+123 -123
+7 -7
arch/powerpc/kernel/legacy_serial.c
··· 243 243 * doesn't work for these settings, you'll have to add your own special 244 244 * cases here 245 245 */ 246 - if (device_is_compatible(pci_dev, "pci13a8,152") || 247 - device_is_compatible(pci_dev, "pci13a8,154") || 248 - device_is_compatible(pci_dev, "pci13a8,158")) { 246 + if (of_device_is_compatible(pci_dev, "pci13a8,152") || 247 + of_device_is_compatible(pci_dev, "pci13a8,154") || 248 + of_device_is_compatible(pci_dev, "pci13a8,158")) { 249 249 addr += 0x200 * lindex; 250 250 base += 0x200 * lindex; 251 251 } else { ··· 364 364 /* Check for known pciclass, and also check wether we have 365 365 * a device with child nodes for ports or not 366 366 */ 367 - if (device_is_compatible(np, "pciclass,0700") || 368 - device_is_compatible(np, "pciclass,070002")) 367 + if (of_device_is_compatible(np, "pciclass,0700") || 368 + of_device_is_compatible(np, "pciclass,070002")) 369 369 pci = np; 370 - else if (device_is_compatible(parent, "pciclass,0700") || 371 - device_is_compatible(parent, "pciclass,070002")) 370 + else if (of_device_is_compatible(parent, "pciclass,0700") || 371 + of_device_is_compatible(parent, "pciclass,070002")) 372 372 pci = parent; 373 373 else { 374 374 of_node_put(parent);
+1 -1
arch/powerpc/kernel/of_device.c
··· 27 27 match &= node->type 28 28 && !strcmp(matches->type, node->type); 29 29 if (matches->compatible[0]) 30 - match &= device_is_compatible(node, 30 + match &= of_device_is_compatible(node, 31 31 matches->compatible); 32 32 if (match) 33 33 return matches;
+1 -1
arch/powerpc/kernel/vio.c
··· 117 117 { 118 118 while (ids->type[0] != '\0') { 119 119 if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) && 120 - device_is_compatible(dev->dev.archdata.of_node, 120 + of_device_is_compatible(dev->dev.archdata.of_node, 121 121 ids->compat)) 122 122 return ids; 123 123 ids++;
+1 -1
arch/powerpc/platforms/85xx/mpc8544_ds.c
··· 84 84 #ifdef CONFIG_PPC_I8259 85 85 /* Initialize the i8259 controller */ 86 86 for_each_node_by_type(np, "interrupt-controller") 87 - if (device_is_compatible(np, "chrp,iic")) { 87 + if (of_device_is_compatible(np, "chrp,iic")) { 88 88 cascade_node = np; 89 89 break; 90 90 }
+1 -1
arch/powerpc/platforms/85xx/mpc85xx_cds.c
··· 197 197 #ifdef CONFIG_PPC_I8259 198 198 /* Initialize the i8259 controller */ 199 199 for_each_node_by_type(np, "interrupt-controller") 200 - if (device_is_compatible(np, "chrp,iic")) { 200 + if (of_device_is_compatible(np, "chrp,iic")) { 201 201 cascade_node = np; 202 202 break; 203 203 }
+1 -1
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
··· 102 102 #ifdef CONFIG_PCI 103 103 /* Initialize i8259 controller */ 104 104 for_each_node_by_type(np, "interrupt-controller") 105 - if (device_is_compatible(np, "chrp,iic")) { 105 + if (of_device_is_compatible(np, "chrp,iic")) { 106 106 cascade_node = np; 107 107 break; 108 108 }
+3 -3
arch/powerpc/platforms/cell/interrupt.c
··· 227 227 228 228 static int iic_host_match(struct irq_host *h, struct device_node *node) 229 229 { 230 - return device_is_compatible(node, 230 + return of_device_is_compatible(node, 231 231 "IBM,CBEA-Internal-Interrupt-Controller"); 232 232 } 233 233 ··· 256 256 unsigned int node, ext, unit, class; 257 257 const u32 *val; 258 258 259 - if (!device_is_compatible(ct, 259 + if (!of_device_is_compatible(ct, 260 260 "IBM,CBEA-Internal-Interrupt-Controller")) 261 261 return -ENODEV; 262 262 if (intsize != 1) ··· 324 324 325 325 for (dn = NULL; 326 326 (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) { 327 - if (!device_is_compatible(dn, 327 + if (!of_device_is_compatible(dn, 328 328 "IBM,CBEA-Internal-Interrupt-Controller")) 329 329 continue; 330 330 np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL);
+1 -1
arch/powerpc/platforms/cell/setup.c
··· 112 112 113 113 for (dn = NULL; 114 114 (dn = of_find_node_by_name(dn, "interrupt-controller"));) { 115 - if (!device_is_compatible(dn, "CBEA,platform-open-pic")) 115 + if (!of_device_is_compatible(dn, "CBEA,platform-open-pic")) 116 116 continue; 117 117 118 118 /* The MPIC driver will get everything it needs from the
+2 -2
arch/powerpc/platforms/cell/spider-pic.c
··· 358 358 */ 359 359 for (dn = NULL; 360 360 (dn = of_find_node_by_name(dn, "interrupt-controller"));) { 361 - if (device_is_compatible(dn, "CBEA,platform-spider-pic")) { 361 + if (of_device_is_compatible(dn, "CBEA,platform-spider-pic")) { 362 362 if (of_address_to_resource(dn, 0, &r)) { 363 363 printk(KERN_WARNING "spider-pic: Failed\n"); 364 364 continue; 365 365 } 366 - } else if (device_is_compatible(dn, "sti,platform-spider-pic") 366 + } else if (of_device_is_compatible(dn, "sti,platform-spider-pic") 367 367 && (chip < 2)) { 368 368 static long hard_coded_pics[] = 369 369 { 0x24000008000ul, 0x34000008000ul};
+1 -1
arch/powerpc/platforms/chrp/pci.c
··· 267 267 model = of_get_property(dev, "model", NULL); 268 268 if (model == NULL) 269 269 model = "<none>"; 270 - if (device_is_compatible(dev, "IBM,python")) { 270 + if (of_device_is_compatible(dev, "IBM,python")) { 271 271 setup_python(hose, dev); 272 272 } else if (is_mot 273 273 || strncmp(model, "Motorola, Grackle", 17) == 0) {
+1 -1
arch/powerpc/platforms/chrp/setup.c
··· 448 448 449 449 /* Look for cascade */ 450 450 for_each_node_by_type(np, "interrupt-controller") 451 - if (device_is_compatible(np, "chrp,iic")) { 451 + if (of_device_is_compatible(np, "chrp,iic")) { 452 452 pic = np; 453 453 break; 454 454 }
+6 -6
arch/powerpc/platforms/maple/pci.c
··· 467 467 hose->last_busno = bus_range ? bus_range[1] : 0xff; 468 468 469 469 disp_name = NULL; 470 - if (device_is_compatible(dev, "u3-agp")) { 470 + if (of_device_is_compatible(dev, "u3-agp")) { 471 471 setup_u3_agp(hose); 472 472 disp_name = "U3-AGP"; 473 473 primary = 0; 474 - } else if (device_is_compatible(dev, "u3-ht")) { 474 + } else if (of_device_is_compatible(dev, "u3-ht")) { 475 475 setup_u3_ht(hose); 476 476 disp_name = "U3-HT"; 477 477 primary = 1; 478 - } else if (device_is_compatible(dev, "u4-pcie")) { 478 + } else if (of_device_is_compatible(dev, "u4-pcie")) { 479 479 setup_u4_pcie(hose); 480 480 disp_name = "U4-PCIE"; 481 481 primary = 0; ··· 556 556 continue; 557 557 if (strcmp(np->type, "pci") && strcmp(np->type, "ht")) 558 558 continue; 559 - if ((device_is_compatible(np, "u4-pcie") || 560 - device_is_compatible(np, "u3-agp")) && 559 + if ((of_device_is_compatible(np, "u4-pcie") || 560 + of_device_is_compatible(np, "u3-agp")) && 561 561 add_bridge(np) == 0) 562 562 of_node_get(np); 563 563 564 - if (device_is_compatible(np, "u3-ht")) { 564 + if (of_device_is_compatible(np, "u3-ht")) { 565 565 of_node_get(np); 566 566 ht = np; 567 567 }
+1 -1
arch/powerpc/platforms/maple/setup.c
··· 231 231 */ 232 232 233 233 for_each_node_by_type(np, "interrupt-controller") 234 - if (device_is_compatible(np, "open-pic")) { 234 + if (of_device_is_compatible(np, "open-pic")) { 235 235 mpic_node = np; 236 236 break; 237 237 }
+1 -1
arch/powerpc/platforms/pasemi/setup.c
··· 114 114 mpic_node = NULL; 115 115 116 116 for_each_node_by_type(np, "interrupt-controller") 117 - if (device_is_compatible(np, "open-pic")) { 117 + if (of_device_is_compatible(np, "open-pic")) { 118 118 mpic_node = np; 119 119 break; 120 120 }
+13 -13
arch/powerpc/platforms/powermac/feature.c
··· 1418 1418 phy = of_get_next_child(node, NULL); 1419 1419 if (!phy) 1420 1420 return -ENODEV; 1421 - need_reset = device_is_compatible(phy, "B5221"); 1421 + need_reset = of_device_is_compatible(phy, "B5221"); 1422 1422 of_node_put(phy); 1423 1423 if (!need_reset) 1424 1424 return 0; ··· 2624 2624 for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) { 2625 2625 if (!compat) 2626 2626 break; 2627 - if (device_is_compatible(node, compat)) 2627 + if (of_device_is_compatible(node, compat)) 2628 2628 break; 2629 2629 } 2630 2630 if (!node) ··· 2728 2728 conn = of_get_property(np, "AAPL,connector", &len); 2729 2729 if (conn && (strcmp(conn, "infrared") == 0)) 2730 2730 port_type = PMAC_SCC_IRDA; 2731 - else if (device_is_compatible(np, "cobalt")) 2731 + else if (of_device_is_compatible(np, "cobalt")) 2732 2732 modem = 1; 2733 2733 else if (slots && slots->count > 0) { 2734 2734 if (strcmp(slots->name, "IrDA") == 0) ··· 2787 2787 */ 2788 2788 np = of_find_node_by_name(NULL, "ethernet"); 2789 2789 while(np) { 2790 - if (device_is_compatible(np, "K2-GMAC")) 2790 + if (of_device_is_compatible(np, "K2-GMAC")) 2791 2791 g5_gmac_enable(np, 0, 1); 2792 2792 np = of_find_node_by_name(np, "ethernet"); 2793 2793 } ··· 2799 2799 */ 2800 2800 np = of_find_node_by_name(NULL, "firewire"); 2801 2801 while(np) { 2802 - if (device_is_compatible(np, "pci106b,5811")) { 2802 + if (of_device_is_compatible(np, "pci106b,5811")) { 2803 2803 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; 2804 2804 g5_fw_enable(np, 0, 1); 2805 2805 } ··· 2817 2817 np = of_find_node_by_name(NULL, "ethernet"); 2818 2818 while(np) { 2819 2819 if (np->parent 2820 - && device_is_compatible(np->parent, "uni-north") 2821 - && device_is_compatible(np, "gmac")) 2820 + && of_device_is_compatible(np->parent, "uni-north") 2821 + && of_device_is_compatible(np, "gmac")) 2822 2822 core99_gmac_enable(np, 0, 1); 2823 2823 np = of_find_node_by_name(np, "ethernet"); 2824 2824 } ··· 2831 2831 np = of_find_node_by_name(NULL, "firewire"); 2832 2832 while(np) { 2833 2833 if (np->parent 2834 - && device_is_compatible(np->parent, "uni-north") 2835 - && (device_is_compatible(np, "pci106b,18") || 2836 - device_is_compatible(np, "pci106b,30") || 2837 - device_is_compatible(np, "pci11c1,5811"))) { 2834 + && of_device_is_compatible(np->parent, "uni-north") 2835 + && (of_device_is_compatible(np, "pci106b,18") || 2836 + of_device_is_compatible(np, "pci106b,30") || 2837 + of_device_is_compatible(np, "pci11c1,5811"))) { 2838 2838 macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; 2839 2839 core99_firewire_enable(np, 0, 1); 2840 2840 } ··· 2845 2845 np = of_find_node_by_name(NULL, "ata-6"); 2846 2846 while(np) { 2847 2847 if (np->parent 2848 - && device_is_compatible(np->parent, "uni-north") 2849 - && device_is_compatible(np, "kauai-ata")) { 2848 + && of_device_is_compatible(np->parent, "uni-north") 2849 + && of_device_is_compatible(np, "kauai-ata")) { 2850 2850 core99_ata100_enable(np, 1); 2851 2851 } 2852 2852 np = of_find_node_by_name(np, "ata-6");
+1 -1
arch/powerpc/platforms/powermac/low_i2c.c
··· 1207 1207 if (strcmp(np->name, p->name)) 1208 1208 continue; 1209 1209 if (p->compatible && 1210 - !device_is_compatible(np, p->compatible)) 1210 + !of_device_is_compatible(np, p->compatible)) 1211 1211 continue; 1212 1212 if (p->quirks & pmac_i2c_quirk_skip) 1213 1213 break;
+2 -2
arch/powerpc/platforms/powermac/nvram.c
··· 553 553 * identify the chip using flash id commands and base ourselves on 554 554 * a list of known chips IDs 555 555 */ 556 - if (device_is_compatible(dp, "amd-0137")) { 556 + if (of_device_is_compatible(dp, "amd-0137")) { 557 557 core99_erase_bank = amd_erase_bank; 558 558 core99_write_bank = amd_write_bank; 559 559 } else { ··· 588 588 } 589 589 } 590 590 591 - is_core_99 = device_is_compatible(dp, "nvram,flash"); 591 + is_core_99 = of_device_is_compatible(dp, "nvram,flash"); 592 592 if (is_core_99) { 593 593 err = core99_nvram_setup(dp, r1.start); 594 594 goto bail;
+15 -15
arch/powerpc/platforms/powermac/pci.c
··· 934 934 935 935 /* 64 bits only bridges */ 936 936 #ifdef CONFIG_PPC64 937 - if (device_is_compatible(dev, "u3-agp")) { 937 + if (of_device_is_compatible(dev, "u3-agp")) { 938 938 setup_u3_agp(hose); 939 939 disp_name = "U3-AGP"; 940 940 primary = 0; 941 - } else if (device_is_compatible(dev, "u3-ht")) { 941 + } else if (of_device_is_compatible(dev, "u3-ht")) { 942 942 setup_u3_ht(hose); 943 943 disp_name = "U3-HT"; 944 944 primary = 1; 945 - } else if (device_is_compatible(dev, "u4-pcie")) { 945 + } else if (of_device_is_compatible(dev, "u4-pcie")) { 946 946 setup_u4_pcie(hose); 947 947 disp_name = "U4-PCIE"; 948 948 primary = 0; ··· 953 953 954 954 /* 32 bits only bridges */ 955 955 #ifdef CONFIG_PPC32 956 - if (device_is_compatible(dev, "uni-north")) { 956 + if (of_device_is_compatible(dev, "uni-north")) { 957 957 primary = setup_uninorth(hose, &rsrc); 958 958 disp_name = "UniNorth"; 959 959 } else if (strcmp(dev->name, "pci") == 0) { ··· 1129 1129 return 0; 1130 1130 1131 1131 uninorth_child = node->parent && 1132 - device_is_compatible(node->parent, "uni-north"); 1132 + of_device_is_compatible(node->parent, "uni-north"); 1133 1133 1134 1134 /* Firewire & GMAC were disabled after PCI probe, the driver is 1135 1135 * claiming them, we must re-enable them now. 1136 1136 */ 1137 1137 if (uninorth_child && !strcmp(node->name, "firewire") && 1138 - (device_is_compatible(node, "pci106b,18") || 1139 - device_is_compatible(node, "pci106b,30") || 1140 - device_is_compatible(node, "pci11c1,5811"))) { 1138 + (of_device_is_compatible(node, "pci106b,18") || 1139 + of_device_is_compatible(node, "pci106b,30") || 1140 + of_device_is_compatible(node, "pci11c1,5811"))) { 1141 1141 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, node, 0, 1); 1142 1142 pmac_call_feature(PMAC_FTR_1394_ENABLE, node, 0, 1); 1143 1143 updatecfg = 1; 1144 1144 } 1145 1145 if (uninorth_child && !strcmp(node->name, "ethernet") && 1146 - device_is_compatible(node, "gmac")) { 1146 + of_device_is_compatible(node, "gmac")) { 1147 1147 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, node, 0, 1); 1148 1148 updatecfg = 1; 1149 1149 } ··· 1203 1203 #endif /* CONFIG_BLK_DEV_IDE */ 1204 1204 1205 1205 for_each_node_by_name(nd, "firewire") { 1206 - if (nd->parent && (device_is_compatible(nd, "pci106b,18") || 1207 - device_is_compatible(nd, "pci106b,30") || 1208 - device_is_compatible(nd, "pci11c1,5811")) 1209 - && device_is_compatible(nd->parent, "uni-north")) { 1206 + if (nd->parent && (of_device_is_compatible(nd, "pci106b,18") || 1207 + of_device_is_compatible(nd, "pci106b,30") || 1208 + of_device_is_compatible(nd, "pci11c1,5811")) 1209 + && of_device_is_compatible(nd->parent, "uni-north")) { 1210 1210 pmac_call_feature(PMAC_FTR_1394_ENABLE, nd, 0, 0); 1211 1211 pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, nd, 0, 0); 1212 1212 } 1213 1213 } 1214 1214 of_node_put(nd); 1215 1215 for_each_node_by_name(nd, "ethernet") { 1216 - if (nd->parent && device_is_compatible(nd, "gmac") 1217 - && device_is_compatible(nd->parent, "uni-north")) 1216 + if (nd->parent && of_device_is_compatible(nd, "gmac") 1217 + && of_device_is_compatible(nd->parent, "uni-north")) 1218 1218 pmac_call_feature(PMAC_FTR_GMAC_ENABLE, nd, 0, 0); 1219 1219 } 1220 1220 of_node_put(nd);
+1 -1
arch/powerpc/platforms/powermac/pic.c
··· 364 364 slave = of_find_node_by_name(master, "mac-io"); 365 365 366 366 /* Check ordering of master & slave */ 367 - if (device_is_compatible(master, "gatwick")) { 367 + if (of_device_is_compatible(master, "gatwick")) { 368 368 struct device_node *tmp; 369 369 BUG_ON(slave == NULL); 370 370 tmp = master;
+2 -2
arch/powerpc/platforms/powermac/setup.c
··· 659 659 /* We need to use normal PCI probing for the AGP bus, 660 660 * since the device for the AGP bridge isn't in the tree. 661 661 */ 662 - if (bus->self == NULL && (device_is_compatible(node, "u3-agp") || 663 - device_is_compatible(node, "u4-pcie"))) 662 + if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || 663 + of_device_is_compatible(node, "u4-pcie"))) 664 664 return PCI_PROBE_NORMAL; 665 665 return PCI_PROBE_DEVTREE; 666 666 }
+3 -3
arch/powerpc/platforms/powermac/smp.c
··· 562 562 /* Look for the clock chip */ 563 563 while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) { 564 564 p = of_get_parent(cc); 565 - ok = p && device_is_compatible(p, "uni-n-i2c"); 565 + ok = p && of_device_is_compatible(p, "uni-n-i2c"); 566 566 of_node_put(p); 567 567 if (!ok) 568 568 continue; ··· 575 575 continue; 576 576 switch (*reg) { 577 577 case 0xd2: 578 - if (device_is_compatible(cc,"pulsar-legacy-slewing")) { 578 + if (of_device_is_compatible(cc,"pulsar-legacy-slewing")) { 579 579 pmac_tb_freeze = smp_core99_pulsar_tb_freeze; 580 580 pmac_tb_pulsar_addr = 0xd2; 581 581 name = "Pulsar"; 582 - } else if (device_is_compatible(cc, "cy28508")) { 582 + } else if (of_device_is_compatible(cc, "cy28508")) { 583 583 pmac_tb_freeze = smp_core99_cypress_tb_freeze; 584 584 name = "Cypress"; 585 585 }
+2 -2
arch/powerpc/platforms/pseries/lpar.c
··· 231 231 goto out; 232 232 vtermno = termno[0]; 233 233 234 - if (device_is_compatible(stdout_node, "hvterm1")) { 234 + if (of_device_is_compatible(stdout_node, "hvterm1")) { 235 235 udbg_putc = udbg_putcLP; 236 236 udbg_getc = udbg_getcLP; 237 237 udbg_getc_poll = udbg_getc_pollLP; 238 238 if (add_console) 239 239 add_preferred_console("hvc", termno[0] & 0xff, NULL); 240 - } else if (device_is_compatible(stdout_node, "hvterm-protocol")) { 240 + } else if (of_device_is_compatible(stdout_node, "hvterm-protocol")) { 241 241 vtermno = termno[0]; 242 242 udbg_putc = udbg_hvsi_putc; 243 243 udbg_getc = udbg_hvsi_getc;
+1 -1
arch/powerpc/platforms/pseries/setup.c
··· 168 168 169 169 /* Look for cascade */ 170 170 for_each_node_by_type(np, "interrupt-controller") 171 - if (device_is_compatible(np, "chrp,iic")) { 171 + if (of_device_is_compatible(np, "chrp,iic")) { 172 172 cascade = np; 173 173 break; 174 174 }
+2 -2
arch/powerpc/platforms/pseries/xics.c
··· 477 477 * like vdevices, events, etc... The trick we use here is to match 478 478 * everything here except the legacy 8259 which is compatible "chrp,iic" 479 479 */ 480 - return !device_is_compatible(node, "chrp,iic"); 480 + return !of_device_is_compatible(node, "chrp,iic"); 481 481 } 482 482 483 483 static int xics_host_map_direct(struct irq_host *h, unsigned int virq, ··· 618 618 unsigned long intack = 0; 619 619 620 620 for_each_node_by_type(np, "interrupt-controller") 621 - if (device_is_compatible(np, "chrp,iic")) { 621 + if (of_device_is_compatible(np, "chrp,iic")) { 622 622 found = np; 623 623 break; 624 624 }
+1 -1
arch/powerpc/sysdev/uic.c
··· 221 221 const u32 *indexp, *dcrreg; 222 222 int len; 223 223 224 - BUG_ON(! device_is_compatible(node, "ibm,uic")); 224 + BUG_ON(! of_device_is_compatible(node, "ibm,uic")); 225 225 226 226 uic = alloc_bootmem(sizeof(*uic)); 227 227 if (! uic)
+1 -1
drivers/char/hvc_iseries.c
··· 579 579 if (!vtermno) 580 580 continue; 581 581 582 - if (!device_is_compatible(vty, "IBM,iSeries-vty")) 582 + if (!of_device_is_compatible(vty, "IBM,iSeries-vty")) 583 583 continue; 584 584 585 585 if (num_found == 0)
+1 -1
drivers/char/hvc_vio.c
··· 157 157 if (!vtermno) 158 158 continue; 159 159 160 - if (device_is_compatible(vty, "hvterm1")) { 160 + if (of_device_is_compatible(vty, "hvterm1")) { 161 161 hvc_instantiate(*vtermno, num_found, &hvc_get_put_ops); 162 162 ++num_found; 163 163 }
+1 -1
drivers/char/tpm/tpm_atmel.h
··· 47 47 if (!dn) 48 48 return NULL; 49 49 50 - if (!device_is_compatible(dn, "AT97SC3201")) { 50 + if (!of_device_is_compatible(dn, "AT97SC3201")) { 51 51 of_node_put(dn); 52 52 return NULL; 53 53 }
+2 -2
drivers/hwmon/ams/ams-core.c
··· 208 208 209 209 #ifdef CONFIG_SENSORS_AMS_I2C 210 210 np = of_find_node_by_name(NULL, "accelerometer"); 211 - if (np && device_is_compatible(np, "AAPL,accelerometer_1")) 211 + if (np && of_device_is_compatible(np, "AAPL,accelerometer_1")) 212 212 /* Found I2C motion sensor */ 213 213 return ams_i2c_init(np); 214 214 #endif 215 215 216 216 #ifdef CONFIG_SENSORS_AMS_PMU 217 217 np = of_find_node_by_name(NULL, "sms"); 218 - if (np && device_is_compatible(np, "sms")) 218 + if (np && of_device_is_compatible(np, "sms")) 219 219 /* Found PMU motion sensor */ 220 220 return ams_pmu_init(np); 221 221 #endif
+1 -1
drivers/ide/pci/pdc202xx_new.c
··· 398 398 unsigned int class_rev = 0; 399 399 u8 conf; 400 400 401 - if (np == NULL || !device_is_compatible(np, "kiwi-root")) 401 + if (np == NULL || !of_device_is_compatible(np, "kiwi-root")) 402 402 return; 403 403 404 404 pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev);
+7 -7
drivers/ide/ppc/pmac.c
··· 1157 1157 1158 1158 pmif->cable_80 = 0; 1159 1159 pmif->broken_dma = pmif->broken_dma_warn = 0; 1160 - if (device_is_compatible(np, "shasta-ata")) 1160 + if (of_device_is_compatible(np, "shasta-ata")) 1161 1161 pmif->kind = controller_sh_ata6; 1162 - else if (device_is_compatible(np, "kauai-ata")) 1162 + else if (of_device_is_compatible(np, "kauai-ata")) 1163 1163 pmif->kind = controller_un_ata6; 1164 - else if (device_is_compatible(np, "K2-UATA")) 1164 + else if (of_device_is_compatible(np, "K2-UATA")) 1165 1165 pmif->kind = controller_k2_ata6; 1166 - else if (device_is_compatible(np, "keylargo-ata")) { 1166 + else if (of_device_is_compatible(np, "keylargo-ata")) { 1167 1167 if (strcmp(np->name, "ata-4") == 0) 1168 1168 pmif->kind = controller_kl_ata4; 1169 1169 else 1170 1170 pmif->kind = controller_kl_ata3; 1171 - } else if (device_is_compatible(np, "heathrow-ata")) 1171 + } else if (of_device_is_compatible(np, "heathrow-ata")) 1172 1172 pmif->kind = controller_heathrow; 1173 1173 else { 1174 1174 pmif->kind = controller_ohare; ··· 1190 1190 * they have a 80 conductor cable, this seem to be always the case unless 1191 1191 * the user mucked around 1192 1192 */ 1193 - if (device_is_compatible(np, "K2-UATA") || 1194 - device_is_compatible(np, "shasta-ata")) 1193 + if (of_device_is_compatible(np, "K2-UATA") || 1194 + of_device_is_compatible(np, "shasta-ata")) 1195 1195 pmif->cable_80 = 1; 1196 1196 1197 1197 /* On Kauai-type controllers, we make sure the FCR is correct */
+1 -1
drivers/macintosh/smu.c
··· 606 606 struct device_node *np; 607 607 608 608 for (np = NULL; (np = of_get_next_child(smu->of_node, np)) != NULL;) 609 - if (device_is_compatible(np, "smu-sensors")) 609 + if (of_device_is_compatible(np, "smu-sensors")) 610 610 of_platform_device_create(np, "smu-sensors", 611 611 &smu->of_dev->dev); 612 612 }
+2 -2
drivers/macintosh/therm_adt746x.c
··· 560 560 np = of_find_node_by_name(NULL, "fan"); 561 561 if (!np) 562 562 return -ENODEV; 563 - if (device_is_compatible(np, "adt7460")) 563 + if (of_device_is_compatible(np, "adt7460")) 564 564 therm_type = ADT7460; 565 - else if (device_is_compatible(np, "adt7467")) 565 + else if (of_device_is_compatible(np, "adt7467")) 566 566 therm_type = ADT7467; 567 567 else 568 568 return -ENODEV;
+5 -5
drivers/macintosh/via-pmu.c
··· 310 310 PMU_INT_TICK; 311 311 312 312 if (vias->parent->name && ((strcmp(vias->parent->name, "ohare") == 0) 313 - || device_is_compatible(vias->parent, "ohare"))) 313 + || of_device_is_compatible(vias->parent, "ohare"))) 314 314 pmu_kind = PMU_OHARE_BASED; 315 - else if (device_is_compatible(vias->parent, "paddington")) 315 + else if (of_device_is_compatible(vias->parent, "paddington")) 316 316 pmu_kind = PMU_PADDINGTON_BASED; 317 - else if (device_is_compatible(vias->parent, "heathrow")) 317 + else if (of_device_is_compatible(vias->parent, "heathrow")) 318 318 pmu_kind = PMU_HEATHROW_BASED; 319 - else if (device_is_compatible(vias->parent, "Keylargo") 320 - || device_is_compatible(vias->parent, "K2-Keylargo")) { 319 + else if (of_device_is_compatible(vias->parent, "Keylargo") 320 + || of_device_is_compatible(vias->parent, "K2-Keylargo")) { 321 321 struct device_node *gpiop; 322 322 struct device_node *adbp; 323 323 u64 gaddr = OF_BAD_ADDR;
+2 -2
drivers/macintosh/windfarm_lm75_sensor.c
··· 188 188 if (loc == NULL || addr == 0) 189 189 continue; 190 190 /* real lm75 */ 191 - if (device_is_compatible(dev, "lm75")) 191 + if (of_device_is_compatible(dev, "lm75")) 192 192 wf_lm75_create(adapter, addr, 0, loc); 193 193 /* ds1775 (compatible, better resolution */ 194 - else if (device_is_compatible(dev, "ds1775")) 194 + else if (of_device_is_compatible(dev, "ds1775")) 195 195 wf_lm75_create(adapter, addr, 1, loc); 196 196 } 197 197 return 0;
+1 -1
drivers/macintosh/windfarm_max6690_sensor.c
··· 131 131 */ 132 132 if (!pmac_i2c_match_adapter(dev, adapter)) 133 133 continue; 134 - if (!device_is_compatible(dev, "max6690")) 134 + if (!of_device_is_compatible(dev, "max6690")) 135 135 continue; 136 136 addr = pmac_i2c_get_dev_addr(dev); 137 137 loc = of_get_property(dev, "hwsensor-location", NULL);
+1 -1
drivers/macintosh/windfarm_smu_controls.c
··· 263 263 /* Look for RPM fans */ 264 264 for (fans = NULL; (fans = of_get_next_child(smu, fans)) != NULL;) 265 265 if (!strcmp(fans->name, "rpm-fans") || 266 - device_is_compatible(fans, "smu-rpm-fans")) 266 + of_device_is_compatible(fans, "smu-rpm-fans")) 267 267 break; 268 268 for (fan = NULL; 269 269 fans && (fan = of_get_next_child(fans, fan)) != NULL;) {
+1 -1
drivers/macintosh/windfarm_smu_sat.c
··· 380 380 busnode = pmac_i2c_get_bus_node(bus); 381 381 382 382 while ((dev = of_get_next_child(busnode, dev)) != NULL) 383 - if (device_is_compatible(dev, "smu-sat")) 383 + if (of_device_is_compatible(dev, "smu-sat")) 384 384 wf_sat_create(adapter, dev); 385 385 return 0; 386 386 }
+1 -1
drivers/serial/pmac_zilog.c
··· 1450 1450 /* 1451 1451 * Detect port type 1452 1452 */ 1453 - if (device_is_compatible(np, "cobalt")) 1453 + if (of_device_is_compatible(np, "cobalt")) 1454 1454 uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; 1455 1455 conn = of_get_property(np, "AAPL,connector", &len); 1456 1456 if (conn && (strcmp(conn, "infrared") == 0))
+2 -2
drivers/usb/host/ohci-ppc-of.c
··· 97 97 return -ENODEV; 98 98 99 99 is_bigendian = 100 - device_is_compatible(dn, "ohci-bigendian") || 101 - device_is_compatible(dn, "ohci-be"); 100 + of_device_is_compatible(dn, "ohci-bigendian") || 101 + of_device_is_compatible(dn, "ohci-be"); 102 102 103 103 dev_dbg(&op->dev, "initializing PPC-OF USB Controller\n"); 104 104
+2 -2
drivers/video/offb.c
··· 322 322 ioremap(base + 0x7ff000, 0x1000) + 0xcc0; 323 323 par->cmap_data = par->cmap_adr + 1; 324 324 par->cmap_type = cmap_m64; 325 - } else if (dp && (device_is_compatible(dp, "pci1014,b7") || 326 - device_is_compatible(dp, "pci1014,21c"))) { 325 + } else if (dp && (of_device_is_compatible(dp, "pci1014,b7") || 326 + of_device_is_compatible(dp, "pci1014,21c"))) { 327 327 par->cmap_adr = offb_map_reg(dp, 0, 0x6000, 0x1000); 328 328 if (par->cmap_adr) 329 329 par->cmap_type = cmap_gxt2000;
+2 -2
sound/aoa/codecs/snd-aoa-codec-onyx.c
··· 1061 1061 busnode = pmac_i2c_get_bus_node(bus); 1062 1062 1063 1063 while ((dev = of_get_next_child(busnode, dev)) != NULL) { 1064 - if (device_is_compatible(dev, "pcm3052")) { 1064 + if (of_device_is_compatible(dev, "pcm3052")) { 1065 1065 const u32 *addr; 1066 1066 printk(KERN_DEBUG PFX "found pcm3052\n"); 1067 1067 addr = of_get_property(dev, "reg", NULL); ··· 1074 1074 /* if that didn't work, try desperate mode for older 1075 1075 * machines that have stuff missing from the device tree */ 1076 1076 1077 - if (!device_is_compatible(busnode, "k2-i2c")) 1077 + if (!of_device_is_compatible(busnode, "k2-i2c")) 1078 1078 return -ENODEV; 1079 1079 1080 1080 printk(KERN_DEBUG PFX "found k2-i2c, checking if onyx chip is on it\n");
+1 -1
sound/aoa/codecs/snd-aoa-codec-tas.c
··· 938 938 busnode = pmac_i2c_get_bus_node(bus); 939 939 940 940 while ((dev = of_get_next_child(busnode, dev)) != NULL) { 941 - if (device_is_compatible(dev, "tas3004")) { 941 + if (of_device_is_compatible(dev, "tas3004")) { 942 942 const u32 *addr; 943 943 printk(KERN_DEBUG PFX "found tas3004\n"); 944 944 addr = of_get_property(dev, "reg", NULL);
+2 -2
sound/aoa/soundbus/i2sbus/i2sbus-core.c
··· 336 336 } 337 337 338 338 while ((np = of_get_next_child(dev->ofdev.node, np))) { 339 - if (device_is_compatible(np, "i2sbus") || 340 - device_is_compatible(np, "i2s-modem")) { 339 + if (of_device_is_compatible(np, "i2sbus") || 340 + of_device_is_compatible(np, "i2s-modem")) { 341 341 got += i2sbus_add_dev(dev, control, np); 342 342 } 343 343 }
+8 -8
sound/oss/dmasound/dmasound_awacs.c
··· 362 362 of_get_property(np,"audio-gpio",NULL); 363 363 if (property != 0 && strcmp(property,name) == 0) 364 364 break; 365 - } else if (compatible && device_is_compatible(np, compatible)) 365 + } else if (compatible && of_device_is_compatible(np, compatible)) 366 366 break; 367 367 np = of_get_next_child(gpiop, np); 368 368 } ··· 2620 2620 2621 2621 if (info) { 2622 2622 /* must do awacs first to allow screamer to overide it */ 2623 - if (device_is_compatible(info, "awacs")) 2623 + if (of_device_is_compatible(info, "awacs")) 2624 2624 codec = AWACS_AWACS ; 2625 - if (device_is_compatible(info, "screamer")) 2625 + if (of_device_is_compatible(info, "screamer")) 2626 2626 codec = AWACS_SCREAMER; 2627 - if (device_is_compatible(info, "burgundy")) 2627 + if (of_device_is_compatible(info, "burgundy")) 2628 2628 codec = AWACS_BURGUNDY ; 2629 - if (device_is_compatible(info, "daca")) 2629 + if (of_device_is_compatible(info, "daca")) 2630 2630 codec = AWACS_DACA; 2631 - if (device_is_compatible(info, "tumbler")) 2631 + if (of_device_is_compatible(info, "tumbler")) 2632 2632 codec = AWACS_TUMBLER; 2633 - if (device_is_compatible(info, "snapper")) 2633 + if (of_device_is_compatible(info, "snapper")) 2634 2634 codec = AWACS_SNAPPER; 2635 2635 } 2636 2636 return codec ; ··· 2772 2772 2773 2773 for (mio = io->parent; mio ; mio = mio->parent) { 2774 2774 if (strcmp(mio->name, "mac-io") == 0) { 2775 - if (device_is_compatible(mio, "Keylargo")) 2775 + if (of_device_is_compatible(mio, "Keylargo")) 2776 2776 kl = 1; 2777 2777 break; 2778 2778 }
+7 -7
sound/ppc/pmac.c
··· 843 843 /* if seems that Keylargo can't byte-swap */ 844 844 for (mio = chip->node->parent; mio; mio = mio->parent) { 845 845 if (strcmp(mio->name, "mac-io") == 0) { 846 - if (device_is_compatible(mio, "Keylargo")) 846 + if (of_device_is_compatible(mio, "Keylargo")) 847 847 chip->can_byte_swap = 0; 848 848 break; 849 849 } ··· 910 910 chip->node = of_find_node_by_name(NULL, "i2s-a"); 911 911 if (chip->node && chip->node->parent && 912 912 chip->node->parent->parent) { 913 - if (device_is_compatible(chip->node->parent->parent, 913 + if (of_device_is_compatible(chip->node->parent->parent, 914 914 "K2-Keylargo")) 915 915 chip->is_k2 = 1; 916 916 } ··· 941 941 return -ENODEV; 942 942 } 943 943 /* This should be verified on older screamers */ 944 - if (device_is_compatible(sound, "screamer")) { 944 + if (of_device_is_compatible(sound, "screamer")) { 945 945 chip->model = PMAC_SCREAMER; 946 946 // chip->can_byte_swap = 0; /* FIXME: check this */ 947 947 } 948 - if (device_is_compatible(sound, "burgundy")) { 948 + if (of_device_is_compatible(sound, "burgundy")) { 949 949 chip->model = PMAC_BURGUNDY; 950 950 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ 951 951 } 952 - if (device_is_compatible(sound, "daca")) { 952 + if (of_device_is_compatible(sound, "daca")) { 953 953 chip->model = PMAC_DACA; 954 954 chip->can_capture = 0; /* no capture */ 955 955 chip->can_duplex = 0; 956 956 // chip->can_byte_swap = 0; /* FIXME: check this */ 957 957 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ 958 958 } 959 - if (device_is_compatible(sound, "tumbler")) { 959 + if (of_device_is_compatible(sound, "tumbler")) { 960 960 chip->model = PMAC_TUMBLER; 961 961 chip->can_capture = 0; /* no capture */ 962 962 chip->can_duplex = 0; ··· 965 965 chip->freq_table = tumbler_freqs; 966 966 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ 967 967 } 968 - if (device_is_compatible(sound, "snapper")) { 968 + if (of_device_is_compatible(sound, "snapper")) { 969 969 chip->model = PMAC_SNAPPER; 970 970 // chip->can_byte_swap = 0; /* FIXME: check this */ 971 971 chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
+1 -1
sound/ppc/tumbler.c
··· 1060 1060 1061 1061 for (np = of_get_next_child(gpiop, NULL); np; 1062 1062 np = of_get_next_child(gpiop, np)) { 1063 - if (device_is_compatible(np, name)) 1063 + if (of_device_is_compatible(np, name)) 1064 1064 break; 1065 1065 } 1066 1066 of_node_put(gpiop);