summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/fsl_soc.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2007-12-12 00:28:35 -0600
committerKumar Gala <galak@kernel.crashing.org>2007-12-12 01:50:45 -0600
commite77b28eb199a8d637a00128b86baf515d4eba5fd (patch)
tree4bd63c9312c3ff17da778de9db7bdf07fe9644e6 /arch/powerpc/sysdev/fsl_soc.c
parentec9686c4a57ea46c97126660936f66e8a5eb87eb (diff)
[POWERPC] FSL: enet device tree cleanups
* Removed address fields in ethernet nodes * Removed #address-cells, #size-cells from gianfar nodes * Added cell-index to gianfar and ucc ethernet nodes * Added enet[0..3] labels * Renamed compatible node for gianfar mdio to "fsl,gianfar-mdio" * Removed device_type = "mdio" The matching for gianfar mdio still supports the old "mdio"/"gianfar" combo but it is now considered deprecated. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 81af4bdf252a..4baad80ab731 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -132,15 +132,18 @@ EXPORT_SYMBOL(get_baudrate);
static int __init gfar_mdio_of_init(void)
{
- struct device_node *np;
- unsigned int i;
+ struct device_node *np = NULL;
struct platform_device *mdio_dev;
struct resource res;
int ret;
- for (np = NULL, i = 0;
- (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL;
- i++) {
+ np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio");
+
+ /* try the deprecated version */
+ if (!np)
+ np = of_find_compatible_node(np, "mdio", "gianfar");
+
+ if (np) {
int k;
struct device_node *child = NULL;
struct gianfar_mdio_data mdio_data;
@@ -179,11 +182,13 @@ static int __init gfar_mdio_of_init(void)
goto unreg;
}
+ of_node_put(np);
return 0;
unreg:
platform_device_unregister(mdio_dev);
err:
+ of_node_put(np);
return ret;
}