diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-05-03 03:26:52 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 06:31:14 -0400 |
commit | 55b61fec22caa3e7872caea6c4100fc75cb8f49b (patch) | |
tree | 995c2cf733bbd9ee1adc6e77773b0e31e9c21267 /arch/powerpc | |
parent | d9333afd6a714760c13f76ba275a32ec7bd979c1 (diff) |
[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>
Diffstat (limited to 'arch/powerpc')
25 files changed, 71 insertions, 71 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 63dd2c3ad95e..662cd67428de 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -243,9 +243,9 @@ static int __init add_legacy_pci_port(struct device_node *np, | |||
243 | * doesn't work for these settings, you'll have to add your own special | 243 | * doesn't work for these settings, you'll have to add your own special |
244 | * cases here | 244 | * cases here |
245 | */ | 245 | */ |
246 | if (device_is_compatible(pci_dev, "pci13a8,152") || | 246 | if (of_device_is_compatible(pci_dev, "pci13a8,152") || |
247 | device_is_compatible(pci_dev, "pci13a8,154") || | 247 | of_device_is_compatible(pci_dev, "pci13a8,154") || |
248 | device_is_compatible(pci_dev, "pci13a8,158")) { | 248 | of_device_is_compatible(pci_dev, "pci13a8,158")) { |
249 | addr += 0x200 * lindex; | 249 | addr += 0x200 * lindex; |
250 | base += 0x200 * lindex; | 250 | base += 0x200 * lindex; |
251 | } else { | 251 | } else { |
@@ -364,11 +364,11 @@ void __init find_legacy_serial_ports(void) | |||
364 | /* Check for known pciclass, and also check wether we have | 364 | /* Check for known pciclass, and also check wether we have |
365 | * a device with child nodes for ports or not | 365 | * a device with child nodes for ports or not |
366 | */ | 366 | */ |
367 | if (device_is_compatible(np, "pciclass,0700") || | 367 | if (of_device_is_compatible(np, "pciclass,0700") || |
368 | device_is_compatible(np, "pciclass,070002")) | 368 | of_device_is_compatible(np, "pciclass,070002")) |
369 | pci = np; | 369 | pci = np; |
370 | else if (device_is_compatible(parent, "pciclass,0700") || | 370 | else if (of_device_is_compatible(parent, "pciclass,0700") || |
371 | device_is_compatible(parent, "pciclass,070002")) | 371 | of_device_is_compatible(parent, "pciclass,070002")) |
372 | pci = parent; | 372 | pci = parent; |
373 | else { | 373 | else { |
374 | of_node_put(parent); | 374 | of_node_put(parent); |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 0c8ea7659d92..e2c765f5f3f4 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -27,7 +27,7 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, | |||
27 | match &= node->type | 27 | match &= node->type |
28 | && !strcmp(matches->type, node->type); | 28 | && !strcmp(matches->type, node->type); |
29 | if (matches->compatible[0]) | 29 | if (matches->compatible[0]) |
30 | match &= device_is_compatible(node, | 30 | match &= of_device_is_compatible(node, |
31 | matches->compatible); | 31 | matches->compatible); |
32 | if (match) | 32 | if (match) |
33 | return matches; | 33 | return matches; |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 9eaefac5053f..ec871063733a 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -117,7 +117,7 @@ static const struct vio_device_id *vio_match_device( | |||
117 | { | 117 | { |
118 | while (ids->type[0] != '\0') { | 118 | while (ids->type[0] != '\0') { |
119 | if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) && | 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 | ids->compat)) | 121 | ids->compat)) |
122 | return ids; | 122 | return ids; |
123 | ids++; | 123 | ids++; |
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c index 2867f85e6325..bec84ffe708e 100644 --- a/arch/powerpc/platforms/85xx/mpc8544_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c | |||
@@ -84,7 +84,7 @@ void __init mpc8544_ds_pic_init(void) | |||
84 | #ifdef CONFIG_PPC_I8259 | 84 | #ifdef CONFIG_PPC_I8259 |
85 | /* Initialize the i8259 controller */ | 85 | /* Initialize the i8259 controller */ |
86 | for_each_node_by_type(np, "interrupt-controller") | 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 | cascade_node = np; | 88 | cascade_node = np; |
89 | break; | 89 | break; |
90 | } | 90 | } |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 7e71636f9098..1490eb3ce0d3 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -197,7 +197,7 @@ static void __init mpc85xx_cds_pic_init(void) | |||
197 | #ifdef CONFIG_PPC_I8259 | 197 | #ifdef CONFIG_PPC_I8259 |
198 | /* Initialize the i8259 controller */ | 198 | /* Initialize the i8259 controller */ |
199 | for_each_node_by_type(np, "interrupt-controller") | 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 | cascade_node = np; | 201 | cascade_node = np; |
202 | break; | 202 | break; |
203 | } | 203 | } |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 3d3d98f5bd4a..90877565caa3 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -102,7 +102,7 @@ mpc86xx_hpcn_init_irq(void) | |||
102 | #ifdef CONFIG_PCI | 102 | #ifdef CONFIG_PCI |
103 | /* Initialize i8259 controller */ | 103 | /* Initialize i8259 controller */ |
104 | for_each_node_by_type(np, "interrupt-controller") | 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 | cascade_node = np; | 106 | cascade_node = np; |
107 | break; | 107 | break; |
108 | } | 108 | } |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 4fc4e92775d0..47264e722029 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -227,7 +227,7 @@ void iic_request_IPIs(void) | |||
227 | 227 | ||
228 | static int iic_host_match(struct irq_host *h, struct device_node *node) | 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 | "IBM,CBEA-Internal-Interrupt-Controller"); | 231 | "IBM,CBEA-Internal-Interrupt-Controller"); |
232 | } | 232 | } |
233 | 233 | ||
@@ -256,7 +256,7 @@ static int iic_host_xlate(struct irq_host *h, struct device_node *ct, | |||
256 | unsigned int node, ext, unit, class; | 256 | unsigned int node, ext, unit, class; |
257 | const u32 *val; | 257 | const u32 *val; |
258 | 258 | ||
259 | if (!device_is_compatible(ct, | 259 | if (!of_device_is_compatible(ct, |
260 | "IBM,CBEA-Internal-Interrupt-Controller")) | 260 | "IBM,CBEA-Internal-Interrupt-Controller")) |
261 | return -ENODEV; | 261 | return -ENODEV; |
262 | if (intsize != 1) | 262 | if (intsize != 1) |
@@ -324,7 +324,7 @@ static int __init setup_iic(void) | |||
324 | 324 | ||
325 | for (dn = NULL; | 325 | for (dn = NULL; |
326 | (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) { | 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 | "IBM,CBEA-Internal-Interrupt-Controller")) | 328 | "IBM,CBEA-Internal-Interrupt-Controller")) |
329 | continue; | 329 | continue; |
330 | np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL); | 330 | np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL); |
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index 54b96183cb64..db6654272e13 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c | |||
@@ -112,7 +112,7 @@ static void __init mpic_init_IRQ(void) | |||
112 | 112 | ||
113 | for (dn = NULL; | 113 | for (dn = NULL; |
114 | (dn = of_find_node_by_name(dn, "interrupt-controller"));) { | 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 | continue; | 116 | continue; |
117 | 117 | ||
118 | /* The MPIC driver will get everything it needs from the | 118 | /* The MPIC driver will get everything it needs from the |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index fb1f15797bbb..05f4b3d3d756 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -358,12 +358,12 @@ void __init spider_init_IRQ(void) | |||
358 | */ | 358 | */ |
359 | for (dn = NULL; | 359 | for (dn = NULL; |
360 | (dn = of_find_node_by_name(dn, "interrupt-controller"));) { | 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 | if (of_address_to_resource(dn, 0, &r)) { | 362 | if (of_address_to_resource(dn, 0, &r)) { |
363 | printk(KERN_WARNING "spider-pic: Failed\n"); | 363 | printk(KERN_WARNING "spider-pic: Failed\n"); |
364 | continue; | 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 | && (chip < 2)) { | 367 | && (chip < 2)) { |
368 | static long hard_coded_pics[] = | 368 | static long hard_coded_pics[] = |
369 | { 0x24000008000ul, 0x34000008000ul}; | 369 | { 0x24000008000ul, 0x34000008000ul}; |
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 1469d6478f67..d32fedc991d3 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -267,7 +267,7 @@ chrp_find_bridges(void) | |||
267 | model = of_get_property(dev, "model", NULL); | 267 | model = of_get_property(dev, "model", NULL); |
268 | if (model == NULL) | 268 | if (model == NULL) |
269 | model = "<none>"; | 269 | model = "<none>"; |
270 | if (device_is_compatible(dev, "IBM,python")) { | 270 | if (of_device_is_compatible(dev, "IBM,python")) { |
271 | setup_python(hose, dev); | 271 | setup_python(hose, dev); |
272 | } else if (is_mot | 272 | } else if (is_mot |
273 | || strncmp(model, "Motorola, Grackle", 17) == 0) { | 273 | || strncmp(model, "Motorola, Grackle", 17) == 0) { |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 1870038a8e0a..373de4c063db 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -448,7 +448,7 @@ static void __init chrp_find_8259(void) | |||
448 | 448 | ||
449 | /* Look for cascade */ | 449 | /* Look for cascade */ |
450 | for_each_node_by_type(np, "interrupt-controller") | 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 | pic = np; | 452 | pic = np; |
453 | break; | 453 | break; |
454 | } | 454 | } |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index b1d3b99c3f9d..7aaa5bbc9363 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -467,15 +467,15 @@ static int __init add_bridge(struct device_node *dev) | |||
467 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | 467 | hose->last_busno = bus_range ? bus_range[1] : 0xff; |
468 | 468 | ||
469 | disp_name = NULL; | 469 | disp_name = NULL; |
470 | if (device_is_compatible(dev, "u3-agp")) { | 470 | if (of_device_is_compatible(dev, "u3-agp")) { |
471 | setup_u3_agp(hose); | 471 | setup_u3_agp(hose); |
472 | disp_name = "U3-AGP"; | 472 | disp_name = "U3-AGP"; |
473 | primary = 0; | 473 | primary = 0; |
474 | } else if (device_is_compatible(dev, "u3-ht")) { | 474 | } else if (of_device_is_compatible(dev, "u3-ht")) { |
475 | setup_u3_ht(hose); | 475 | setup_u3_ht(hose); |
476 | disp_name = "U3-HT"; | 476 | disp_name = "U3-HT"; |
477 | primary = 1; | 477 | primary = 1; |
478 | } else if (device_is_compatible(dev, "u4-pcie")) { | 478 | } else if (of_device_is_compatible(dev, "u4-pcie")) { |
479 | setup_u4_pcie(hose); | 479 | setup_u4_pcie(hose); |
480 | disp_name = "U4-PCIE"; | 480 | disp_name = "U4-PCIE"; |
481 | primary = 0; | 481 | primary = 0; |
@@ -556,12 +556,12 @@ void __init maple_pci_init(void) | |||
556 | continue; | 556 | continue; |
557 | if (strcmp(np->type, "pci") && strcmp(np->type, "ht")) | 557 | if (strcmp(np->type, "pci") && strcmp(np->type, "ht")) |
558 | continue; | 558 | continue; |
559 | if ((device_is_compatible(np, "u4-pcie") || | 559 | if ((of_device_is_compatible(np, "u4-pcie") || |
560 | device_is_compatible(np, "u3-agp")) && | 560 | of_device_is_compatible(np, "u3-agp")) && |
561 | add_bridge(np) == 0) | 561 | add_bridge(np) == 0) |
562 | of_node_get(np); | 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 | of_node_get(np); | 565 | of_node_get(np); |
566 | ht = np; | 566 | ht = np; |
567 | } | 567 | } |
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index 2a30c5b2532e..354c05861629 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -231,7 +231,7 @@ static void __init maple_init_IRQ(void) | |||
231 | */ | 231 | */ |
232 | 232 | ||
233 | for_each_node_by_type(np, "interrupt-controller") | 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 | mpic_node = np; | 235 | mpic_node = np; |
236 | break; | 236 | break; |
237 | } | 237 | } |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 38bd9037773b..38f107b3c521 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -114,7 +114,7 @@ static __init void pas_init_IRQ(void) | |||
114 | mpic_node = NULL; | 114 | mpic_node = NULL; |
115 | 115 | ||
116 | for_each_node_by_type(np, "interrupt-controller") | 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 | mpic_node = np; | 118 | mpic_node = np; |
119 | break; | 119 | break; |
120 | } | 120 | } |
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index 52cfdd86c928..f29705f8047d 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c | |||
@@ -1418,7 +1418,7 @@ static long g5_eth_phy_reset(struct device_node *node, long param, long value) | |||
1418 | phy = of_get_next_child(node, NULL); | 1418 | phy = of_get_next_child(node, NULL); |
1419 | if (!phy) | 1419 | if (!phy) |
1420 | return -ENODEV; | 1420 | return -ENODEV; |
1421 | need_reset = device_is_compatible(phy, "B5221"); | 1421 | need_reset = of_device_is_compatible(phy, "B5221"); |
1422 | of_node_put(phy); | 1422 | of_node_put(phy); |
1423 | if (!need_reset) | 1423 | if (!need_reset) |
1424 | return 0; | 1424 | return 0; |
@@ -2624,7 +2624,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ | |||
2624 | for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) { | 2624 | for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) { |
2625 | if (!compat) | 2625 | if (!compat) |
2626 | break; | 2626 | break; |
2627 | if (device_is_compatible(node, compat)) | 2627 | if (of_device_is_compatible(node, compat)) |
2628 | break; | 2628 | break; |
2629 | } | 2629 | } |
2630 | if (!node) | 2630 | if (!node) |
@@ -2728,7 +2728,7 @@ initial_serial_shutdown(struct device_node *np) | |||
2728 | conn = of_get_property(np, "AAPL,connector", &len); | 2728 | conn = of_get_property(np, "AAPL,connector", &len); |
2729 | if (conn && (strcmp(conn, "infrared") == 0)) | 2729 | if (conn && (strcmp(conn, "infrared") == 0)) |
2730 | port_type = PMAC_SCC_IRDA; | 2730 | port_type = PMAC_SCC_IRDA; |
2731 | else if (device_is_compatible(np, "cobalt")) | 2731 | else if (of_device_is_compatible(np, "cobalt")) |
2732 | modem = 1; | 2732 | modem = 1; |
2733 | else if (slots && slots->count > 0) { | 2733 | else if (slots && slots->count > 0) { |
2734 | if (strcmp(slots->name, "IrDA") == 0) | 2734 | if (strcmp(slots->name, "IrDA") == 0) |
@@ -2787,7 +2787,7 @@ set_initial_features(void) | |||
2787 | */ | 2787 | */ |
2788 | np = of_find_node_by_name(NULL, "ethernet"); | 2788 | np = of_find_node_by_name(NULL, "ethernet"); |
2789 | while(np) { | 2789 | while(np) { |
2790 | if (device_is_compatible(np, "K2-GMAC")) | 2790 | if (of_device_is_compatible(np, "K2-GMAC")) |
2791 | g5_gmac_enable(np, 0, 1); | 2791 | g5_gmac_enable(np, 0, 1); |
2792 | np = of_find_node_by_name(np, "ethernet"); | 2792 | np = of_find_node_by_name(np, "ethernet"); |
2793 | } | 2793 | } |
@@ -2799,7 +2799,7 @@ set_initial_features(void) | |||
2799 | */ | 2799 | */ |
2800 | np = of_find_node_by_name(NULL, "firewire"); | 2800 | np = of_find_node_by_name(NULL, "firewire"); |
2801 | while(np) { | 2801 | while(np) { |
2802 | if (device_is_compatible(np, "pci106b,5811")) { | 2802 | if (of_device_is_compatible(np, "pci106b,5811")) { |
2803 | macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; | 2803 | macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; |
2804 | g5_fw_enable(np, 0, 1); | 2804 | g5_fw_enable(np, 0, 1); |
2805 | } | 2805 | } |
@@ -2817,8 +2817,8 @@ set_initial_features(void) | |||
2817 | np = of_find_node_by_name(NULL, "ethernet"); | 2817 | np = of_find_node_by_name(NULL, "ethernet"); |
2818 | while(np) { | 2818 | while(np) { |
2819 | if (np->parent | 2819 | if (np->parent |
2820 | && device_is_compatible(np->parent, "uni-north") | 2820 | && of_device_is_compatible(np->parent, "uni-north") |
2821 | && device_is_compatible(np, "gmac")) | 2821 | && of_device_is_compatible(np, "gmac")) |
2822 | core99_gmac_enable(np, 0, 1); | 2822 | core99_gmac_enable(np, 0, 1); |
2823 | np = of_find_node_by_name(np, "ethernet"); | 2823 | np = of_find_node_by_name(np, "ethernet"); |
2824 | } | 2824 | } |
@@ -2831,10 +2831,10 @@ set_initial_features(void) | |||
2831 | np = of_find_node_by_name(NULL, "firewire"); | 2831 | np = of_find_node_by_name(NULL, "firewire"); |
2832 | while(np) { | 2832 | while(np) { |
2833 | if (np->parent | 2833 | if (np->parent |
2834 | && device_is_compatible(np->parent, "uni-north") | 2834 | && of_device_is_compatible(np->parent, "uni-north") |
2835 | && (device_is_compatible(np, "pci106b,18") || | 2835 | && (of_device_is_compatible(np, "pci106b,18") || |
2836 | device_is_compatible(np, "pci106b,30") || | 2836 | of_device_is_compatible(np, "pci106b,30") || |
2837 | device_is_compatible(np, "pci11c1,5811"))) { | 2837 | of_device_is_compatible(np, "pci11c1,5811"))) { |
2838 | macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; | 2838 | macio_chips[0].flags |= MACIO_FLAG_FW_SUPPORTED; |
2839 | core99_firewire_enable(np, 0, 1); | 2839 | core99_firewire_enable(np, 0, 1); |
2840 | } | 2840 | } |
@@ -2845,8 +2845,8 @@ set_initial_features(void) | |||
2845 | np = of_find_node_by_name(NULL, "ata-6"); | 2845 | np = of_find_node_by_name(NULL, "ata-6"); |
2846 | while(np) { | 2846 | while(np) { |
2847 | if (np->parent | 2847 | if (np->parent |
2848 | && device_is_compatible(np->parent, "uni-north") | 2848 | && of_device_is_compatible(np->parent, "uni-north") |
2849 | && device_is_compatible(np, "kauai-ata")) { | 2849 | && of_device_is_compatible(np, "kauai-ata")) { |
2850 | core99_ata100_enable(np, 1); | 2850 | core99_ata100_enable(np, 1); |
2851 | } | 2851 | } |
2852 | np = of_find_node_by_name(np, "ata-6"); | 2852 | np = of_find_node_by_name(np, "ata-6"); |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 5430e146b3e9..3f507ab9c5e5 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -1207,7 +1207,7 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev, | |||
1207 | if (strcmp(np->name, p->name)) | 1207 | if (strcmp(np->name, p->name)) |
1208 | continue; | 1208 | continue; |
1209 | if (p->compatible && | 1209 | if (p->compatible && |
1210 | !device_is_compatible(np, p->compatible)) | 1210 | !of_device_is_compatible(np, p->compatible)) |
1211 | continue; | 1211 | continue; |
1212 | if (p->quirks & pmac_i2c_quirk_skip) | 1212 | if (p->quirks & pmac_i2c_quirk_skip) |
1213 | break; | 1213 | break; |
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c index 692945c14919..c6f0f9e738e5 100644 --- a/arch/powerpc/platforms/powermac/nvram.c +++ b/arch/powerpc/platforms/powermac/nvram.c | |||
@@ -553,7 +553,7 @@ static int __init core99_nvram_setup(struct device_node *dp, unsigned long addr) | |||
553 | * identify the chip using flash id commands and base ourselves on | 553 | * identify the chip using flash id commands and base ourselves on |
554 | * a list of known chips IDs | 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 | core99_erase_bank = amd_erase_bank; | 557 | core99_erase_bank = amd_erase_bank; |
558 | core99_write_bank = amd_write_bank; | 558 | core99_write_bank = amd_write_bank; |
559 | } else { | 559 | } else { |
@@ -588,7 +588,7 @@ int __init pmac_nvram_init(void) | |||
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 | if (is_core_99) { | 592 | if (is_core_99) { |
593 | err = core99_nvram_setup(dp, r1.start); | 593 | err = core99_nvram_setup(dp, r1.start); |
594 | goto bail; | 594 | goto bail; |
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index 22c4ae4c6934..c4af9e21ac93 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -934,15 +934,15 @@ static int __init add_bridge(struct device_node *dev) | |||
934 | 934 | ||
935 | /* 64 bits only bridges */ | 935 | /* 64 bits only bridges */ |
936 | #ifdef CONFIG_PPC64 | 936 | #ifdef CONFIG_PPC64 |
937 | if (device_is_compatible(dev, "u3-agp")) { | 937 | if (of_device_is_compatible(dev, "u3-agp")) { |
938 | setup_u3_agp(hose); | 938 | setup_u3_agp(hose); |
939 | disp_name = "U3-AGP"; | 939 | disp_name = "U3-AGP"; |
940 | primary = 0; | 940 | primary = 0; |
941 | } else if (device_is_compatible(dev, "u3-ht")) { | 941 | } else if (of_device_is_compatible(dev, "u3-ht")) { |
942 | setup_u3_ht(hose); | 942 | setup_u3_ht(hose); |
943 | disp_name = "U3-HT"; | 943 | disp_name = "U3-HT"; |
944 | primary = 1; | 944 | primary = 1; |
945 | } else if (device_is_compatible(dev, "u4-pcie")) { | 945 | } else if (of_device_is_compatible(dev, "u4-pcie")) { |
946 | setup_u4_pcie(hose); | 946 | setup_u4_pcie(hose); |
947 | disp_name = "U4-PCIE"; | 947 | disp_name = "U4-PCIE"; |
948 | primary = 0; | 948 | primary = 0; |
@@ -953,7 +953,7 @@ static int __init add_bridge(struct device_node *dev) | |||
953 | 953 | ||
954 | /* 32 bits only bridges */ | 954 | /* 32 bits only bridges */ |
955 | #ifdef CONFIG_PPC32 | 955 | #ifdef CONFIG_PPC32 |
956 | if (device_is_compatible(dev, "uni-north")) { | 956 | if (of_device_is_compatible(dev, "uni-north")) { |
957 | primary = setup_uninorth(hose, &rsrc); | 957 | primary = setup_uninorth(hose, &rsrc); |
958 | disp_name = "UniNorth"; | 958 | disp_name = "UniNorth"; |
959 | } else if (strcmp(dev->name, "pci") == 0) { | 959 | } else if (strcmp(dev->name, "pci") == 0) { |
@@ -1129,21 +1129,21 @@ pmac_pci_enable_device_hook(struct pci_dev *dev, int initial) | |||
1129 | return 0; | 1129 | return 0; |
1130 | 1130 | ||
1131 | uninorth_child = node->parent && | 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 | /* Firewire & GMAC were disabled after PCI probe, the driver is | 1134 | /* Firewire & GMAC were disabled after PCI probe, the driver is |
1135 | * claiming them, we must re-enable them now. | 1135 | * claiming them, we must re-enable them now. |
1136 | */ | 1136 | */ |
1137 | if (uninorth_child && !strcmp(node->name, "firewire") && | 1137 | if (uninorth_child && !strcmp(node->name, "firewire") && |
1138 | (device_is_compatible(node, "pci106b,18") || | 1138 | (of_device_is_compatible(node, "pci106b,18") || |
1139 | device_is_compatible(node, "pci106b,30") || | 1139 | of_device_is_compatible(node, "pci106b,30") || |
1140 | device_is_compatible(node, "pci11c1,5811"))) { | 1140 | of_device_is_compatible(node, "pci11c1,5811"))) { |
1141 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, node, 0, 1); | 1141 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, node, 0, 1); |
1142 | pmac_call_feature(PMAC_FTR_1394_ENABLE, node, 0, 1); | 1142 | pmac_call_feature(PMAC_FTR_1394_ENABLE, node, 0, 1); |
1143 | updatecfg = 1; | 1143 | updatecfg = 1; |
1144 | } | 1144 | } |
1145 | if (uninorth_child && !strcmp(node->name, "ethernet") && | 1145 | if (uninorth_child && !strcmp(node->name, "ethernet") && |
1146 | device_is_compatible(node, "gmac")) { | 1146 | of_device_is_compatible(node, "gmac")) { |
1147 | pmac_call_feature(PMAC_FTR_GMAC_ENABLE, node, 0, 1); | 1147 | pmac_call_feature(PMAC_FTR_GMAC_ENABLE, node, 0, 1); |
1148 | updatecfg = 1; | 1148 | updatecfg = 1; |
1149 | } | 1149 | } |
@@ -1203,18 +1203,18 @@ void __init pmac_pcibios_after_init(void) | |||
1203 | #endif /* CONFIG_BLK_DEV_IDE */ | 1203 | #endif /* CONFIG_BLK_DEV_IDE */ |
1204 | 1204 | ||
1205 | for_each_node_by_name(nd, "firewire") { | 1205 | for_each_node_by_name(nd, "firewire") { |
1206 | if (nd->parent && (device_is_compatible(nd, "pci106b,18") || | 1206 | if (nd->parent && (of_device_is_compatible(nd, "pci106b,18") || |
1207 | device_is_compatible(nd, "pci106b,30") || | 1207 | of_device_is_compatible(nd, "pci106b,30") || |
1208 | device_is_compatible(nd, "pci11c1,5811")) | 1208 | of_device_is_compatible(nd, "pci11c1,5811")) |
1209 | && device_is_compatible(nd->parent, "uni-north")) { | 1209 | && of_device_is_compatible(nd->parent, "uni-north")) { |
1210 | pmac_call_feature(PMAC_FTR_1394_ENABLE, nd, 0, 0); | 1210 | pmac_call_feature(PMAC_FTR_1394_ENABLE, nd, 0, 0); |
1211 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, nd, 0, 0); | 1211 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, nd, 0, 0); |
1212 | } | 1212 | } |
1213 | } | 1213 | } |
1214 | of_node_put(nd); | 1214 | of_node_put(nd); |
1215 | for_each_node_by_name(nd, "ethernet") { | 1215 | for_each_node_by_name(nd, "ethernet") { |
1216 | if (nd->parent && device_is_compatible(nd, "gmac") | 1216 | if (nd->parent && of_device_is_compatible(nd, "gmac") |
1217 | && device_is_compatible(nd->parent, "uni-north")) | 1217 | && of_device_is_compatible(nd->parent, "uni-north")) |
1218 | pmac_call_feature(PMAC_FTR_GMAC_ENABLE, nd, 0, 0); | 1218 | pmac_call_feature(PMAC_FTR_GMAC_ENABLE, nd, 0, 0); |
1219 | } | 1219 | } |
1220 | of_node_put(nd); | 1220 | of_node_put(nd); |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index ae5097ac0378..87cd6805171a 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -364,7 +364,7 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
364 | slave = of_find_node_by_name(master, "mac-io"); | 364 | slave = of_find_node_by_name(master, "mac-io"); |
365 | 365 | ||
366 | /* Check ordering of master & slave */ | 366 | /* Check ordering of master & slave */ |
367 | if (device_is_compatible(master, "gatwick")) { | 367 | if (of_device_is_compatible(master, "gatwick")) { |
368 | struct device_node *tmp; | 368 | struct device_node *tmp; |
369 | BUG_ON(slave == NULL); | 369 | BUG_ON(slave == NULL); |
370 | tmp = master; | 370 | tmp = master; |
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index e365bff74d83..a410bc76a8a8 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -659,8 +659,8 @@ static int pmac_pci_probe_mode(struct pci_bus *bus) | |||
659 | /* We need to use normal PCI probing for the AGP bus, | 659 | /* We need to use normal PCI probing for the AGP bus, |
660 | * since the device for the AGP bridge isn't in the tree. | 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") || | 662 | if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || |
663 | device_is_compatible(node, "u4-pcie"))) | 663 | of_device_is_compatible(node, "u4-pcie"))) |
664 | return PCI_PROBE_NORMAL; | 664 | return PCI_PROBE_NORMAL; |
665 | return PCI_PROBE_DEVTREE; | 665 | return PCI_PROBE_DEVTREE; |
666 | } | 666 | } |
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 330354113186..84f1860493bb 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -562,7 +562,7 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus) | |||
562 | /* Look for the clock chip */ | 562 | /* Look for the clock chip */ |
563 | while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) { | 563 | while ((cc = of_find_node_by_name(cc, "i2c-hwclock")) != NULL) { |
564 | p = of_get_parent(cc); | 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 | of_node_put(p); | 566 | of_node_put(p); |
567 | if (!ok) | 567 | if (!ok) |
568 | continue; | 568 | continue; |
@@ -575,11 +575,11 @@ static void __init smp_core99_setup_i2c_hwsync(int ncpus) | |||
575 | continue; | 575 | continue; |
576 | switch (*reg) { | 576 | switch (*reg) { |
577 | case 0xd2: | 577 | case 0xd2: |
578 | if (device_is_compatible(cc,"pulsar-legacy-slewing")) { | 578 | if (of_device_is_compatible(cc,"pulsar-legacy-slewing")) { |
579 | pmac_tb_freeze = smp_core99_pulsar_tb_freeze; | 579 | pmac_tb_freeze = smp_core99_pulsar_tb_freeze; |
580 | pmac_tb_pulsar_addr = 0xd2; | 580 | pmac_tb_pulsar_addr = 0xd2; |
581 | name = "Pulsar"; | 581 | name = "Pulsar"; |
582 | } else if (device_is_compatible(cc, "cy28508")) { | 582 | } else if (of_device_is_compatible(cc, "cy28508")) { |
583 | pmac_tb_freeze = smp_core99_cypress_tb_freeze; | 583 | pmac_tb_freeze = smp_core99_cypress_tb_freeze; |
584 | name = "Cypress"; | 584 | name = "Cypress"; |
585 | } | 585 | } |
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c index 3a70e8ad7bc8..362dfbc260a6 100644 --- a/arch/powerpc/platforms/pseries/lpar.c +++ b/arch/powerpc/platforms/pseries/lpar.c | |||
@@ -231,13 +231,13 @@ void __init find_udbg_vterm(void) | |||
231 | goto out; | 231 | goto out; |
232 | vtermno = termno[0]; | 232 | vtermno = termno[0]; |
233 | 233 | ||
234 | if (device_is_compatible(stdout_node, "hvterm1")) { | 234 | if (of_device_is_compatible(stdout_node, "hvterm1")) { |
235 | udbg_putc = udbg_putcLP; | 235 | udbg_putc = udbg_putcLP; |
236 | udbg_getc = udbg_getcLP; | 236 | udbg_getc = udbg_getcLP; |
237 | udbg_getc_poll = udbg_getc_pollLP; | 237 | udbg_getc_poll = udbg_getc_pollLP; |
238 | if (add_console) | 238 | if (add_console) |
239 | add_preferred_console("hvc", termno[0] & 0xff, NULL); | 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 | vtermno = termno[0]; | 241 | vtermno = termno[0]; |
242 | udbg_putc = udbg_hvsi_putc; | 242 | udbg_putc = udbg_hvsi_putc; |
243 | udbg_getc = udbg_hvsi_getc; | 243 | udbg_getc = udbg_hvsi_getc; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 33eec2822c66..470db6efaeb6 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -168,7 +168,7 @@ static void __init pseries_mpic_init_IRQ(void) | |||
168 | 168 | ||
169 | /* Look for cascade */ | 169 | /* Look for cascade */ |
170 | for_each_node_by_type(np, "interrupt-controller") | 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 | cascade = np; | 172 | cascade = np; |
173 | break; | 173 | break; |
174 | } | 174 | } |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 896cbf340c42..b854e7f1001c 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -477,7 +477,7 @@ static int xics_host_match(struct irq_host *h, struct device_node *node) | |||
477 | * like vdevices, events, etc... The trick we use here is to match | 477 | * like vdevices, events, etc... The trick we use here is to match |
478 | * everything here except the legacy 8259 which is compatible "chrp,iic" | 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 | static int xics_host_map_direct(struct irq_host *h, unsigned int virq, | 483 | static int xics_host_map_direct(struct irq_host *h, unsigned int virq, |
@@ -618,7 +618,7 @@ static void __init xics_setup_8259_cascade(void) | |||
618 | unsigned long intack = 0; | 618 | unsigned long intack = 0; |
619 | 619 | ||
620 | for_each_node_by_type(np, "interrupt-controller") | 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 | found = np; | 622 | found = np; |
623 | break; | 623 | break; |
624 | } | 624 | } |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 968fb40af9dc..89059895a20d 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -221,7 +221,7 @@ static struct uic * __init uic_init_one(struct device_node *node) | |||
221 | const u32 *indexp, *dcrreg; | 221 | const u32 *indexp, *dcrreg; |
222 | int len; | 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 | uic = alloc_bootmem(sizeof(*uic)); | 226 | uic = alloc_bootmem(sizeof(*uic)); |
227 | if (! uic) | 227 | if (! uic) |