Skip to content

Commit 55b61fe

Browse files
sfrothwellpaulusmack
authored andcommitted
[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>
1 parent d9333af commit 55b61fe

47 files changed

Lines changed: 123 additions & 123 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/powerpc/kernel/legacy_serial.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ static int __init add_legacy_pci_port(struct device_node *np,
243243
* doesn't work for these settings, you'll have to add your own special
244244
* cases here
245245
*/
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")) {
249249
addr += 0x200 * lindex;
250250
base += 0x200 * lindex;
251251
} else {
@@ -364,11 +364,11 @@ void __init find_legacy_serial_ports(void)
364364
/* Check for known pciclass, and also check wether we have
365365
* a device with child nodes for ports or not
366366
*/
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"))
369369
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"))
372372
pci = parent;
373373
else {
374374
of_node_put(parent);

‎arch/powerpc/kernel/of_device.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches,
2727
match &= node->type
2828
&& !strcmp(matches->type, node->type);
2929
if (matches->compatible[0])
30-
match &= device_is_compatible(node,
30+
match &= of_device_is_compatible(node,
3131
matches->compatible);
3232
if (match)
3333
return matches;

‎arch/powerpc/kernel/vio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static const struct vio_device_id *vio_match_device(
117117
{
118118
while (ids->type[0] != '\0') {
119119
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,
121121
ids->compat))
122122
return ids;
123123
ids++;

‎arch/powerpc/platforms/85xx/mpc8544_ds.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void __init mpc8544_ds_pic_init(void)
8484
#ifdef CONFIG_PPC_I8259
8585
/* Initialize the i8259 controller */
8686
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")) {
8888
cascade_node = np;
8989
break;
9090
}

‎arch/powerpc/platforms/85xx/mpc85xx_cds.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static void __init mpc85xx_cds_pic_init(void)
197197
#ifdef CONFIG_PPC_I8259
198198
/* Initialize the i8259 controller */
199199
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")) {
201201
cascade_node = np;
202202
break;
203203
}

‎arch/powerpc/platforms/86xx/mpc86xx_hpcn.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mpc86xx_hpcn_init_irq(void)
102102
#ifdef CONFIG_PCI
103103
/* Initialize i8259 controller */
104104
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")) {
106106
cascade_node = np;
107107
break;
108108
}

‎arch/powerpc/platforms/cell/interrupt.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void iic_request_IPIs(void)
227227

228228
static int iic_host_match(struct irq_host *h, struct device_node *node)
229229
{
230-
return device_is_compatible(node,
230+
return of_device_is_compatible(node,
231231
"IBM,CBEA-Internal-Interrupt-Controller");
232232
}
233233

@@ -256,7 +256,7 @@ static int iic_host_xlate(struct irq_host *h, struct device_node *ct,
256256
unsigned int node, ext, unit, class;
257257
const u32 *val;
258258

259-
if (!device_is_compatible(ct,
259+
if (!of_device_is_compatible(ct,
260260
"IBM,CBEA-Internal-Interrupt-Controller"))
261261
return -ENODEV;
262262
if (intsize != 1)
@@ -324,7 +324,7 @@ static int __init setup_iic(void)
324324

325325
for (dn = NULL;
326326
(dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) {
327-
if (!device_is_compatible(dn,
327+
if (!of_device_is_compatible(dn,
328328
"IBM,CBEA-Internal-Interrupt-Controller"))
329329
continue;
330330
np = of_get_property(dn, "ibm,interrupt-server-ranges", NULL);

‎arch/powerpc/platforms/cell/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void __init mpic_init_IRQ(void)
112112

113113
for (dn = NULL;
114114
(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"))
116116
continue;
117117

118118
/* The MPIC driver will get everything it needs from the

‎arch/powerpc/platforms/cell/spider-pic.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,12 @@ void __init spider_init_IRQ(void)
358358
*/
359359
for (dn = NULL;
360360
(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")) {
362362
if (of_address_to_resource(dn, 0, &r)) {
363363
printk(KERN_WARNING "spider-pic: Failed\n");
364364
continue;
365365
}
366-
} else if (device_is_compatible(dn, "sti,platform-spider-pic")
366+
} else if (of_device_is_compatible(dn, "sti,platform-spider-pic")
367367
&& (chip < 2)) {
368368
static long hard_coded_pics[] =
369369
{ 0x24000008000ul, 0x34000008000ul};

‎arch/powerpc/platforms/chrp/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ chrp_find_bridges(void)
267267
model = of_get_property(dev, "model", NULL);
268268
if (model == NULL)
269269
model = "<none>";
270-
if (device_is_compatible(dev, "IBM,python")) {
270+
if (of_device_is_compatible(dev, "IBM,python")) {
271271
setup_python(hose, dev);
272272
} else if (is_mot
273273
|| strncmp(model, "Motorola, Grackle", 17) == 0) {

0 commit comments

Comments
 (0)