[POWERPC] fsl: Add warning for unrecognized I2C nodes in the device tree
authorTimur Tabi <timur@freescale.com>
Thu, 15 May 2008 22:04:57 +0000 (17:04 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 2 Jun 2008 19:44:25 +0000 (14:44 -0500)
Update of_find_i2c_driver in fsl_soc.c to display a warning message if an
I2C node in the device tree isn't found in the i2c_devices[] array.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/fsl_soc.c

index 3a7054e2bb75722a731632af377da31f6420496b..a38c364ea260b1c9da020adc0f2cf5c27ea28d60 100644 (file)
@@ -448,6 +448,10 @@ static int __init of_find_i2c_driver(struct device_node *node,
                        return -ENOMEM;
                return 0;
        }
+
+       pr_warning("fsl_soc.c: unrecognized i2c node %s\n",
+               (const char *) of_get_property(node, "compatible", NULL));
+
        return -ENODEV;
 }