aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/low_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powermac/low_i2c.c')
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index d4d411820597..4de058a20d2b 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -617,7 +617,7 @@ static void __init kw_i2c_probe(void)
617 * but not for now 617 * but not for now
618 */ 618 */
619 child = of_get_next_child(np, NULL); 619 child = of_get_next_child(np, NULL);
620 multibus = !child || strcmp(child->name, "i2c-bus"); 620 multibus = !of_node_name_eq(child, "i2c-bus");
621 of_node_put(child); 621 of_node_put(child);
622 622
623 /* For a multibus setup, we get the bus count based on the 623 /* For a multibus setup, we get the bus count based on the
@@ -917,10 +917,9 @@ static void __init smu_i2c_probe(void)
917 * type as older device trees mix i2c busses and other things 917 * type as older device trees mix i2c busses and other things
918 * at the same level 918 * at the same level
919 */ 919 */
920 for (busnode = NULL; 920 for_each_child_of_node(controller, busnode) {
921 (busnode = of_get_next_child(controller, busnode)) != NULL;) { 921 if (!of_node_is_type(busnode, "i2c") &&
922 if (strcmp(busnode->type, "i2c") && 922 !of_node_is_type(busnode, "i2c-bus"))
923 strcmp(busnode->type, "i2c-bus"))
924 continue; 923 continue;
925 reg = of_get_property(busnode, "reg", NULL); 924 reg = of_get_property(busnode, "reg", NULL);
926 if (reg == NULL) 925 if (reg == NULL)
@@ -1206,7 +1205,7 @@ static void pmac_i2c_devscan(void (*callback)(struct device_node *dev,
1206 if (bus != pmac_i2c_find_bus(np)) 1205 if (bus != pmac_i2c_find_bus(np))
1207 continue; 1206 continue;
1208 for (p = whitelist; p->name != NULL; p++) { 1207 for (p = whitelist; p->name != NULL; p++) {
1209 if (strcmp(np->name, p->name)) 1208 if (!of_node_name_eq(np, p->name))
1210 continue; 1209 continue;
1211 if (p->compatible && 1210 if (p->compatible &&
1212 !of_device_is_compatible(np, p->compatible)) 1211 !of_device_is_compatible(np, p->compatible))