diff options
author | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-04-21 20:46:44 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-25 02:08:07 -0400 |
commit | be63c09afe9153be6ba4373d1b69848cf2b32268 (patch) | |
tree | 003e21e1bcfb17838009407bb3ac01405bb7c001 /drivers | |
parent | 51d4a1cc2e20e2848c6141989f733f0e6548598b (diff) |
ibm_newemac Use status property for unused/unwired EMACs
Convert ibm_newemac to use the of_device_is_available function when checking
for unused/unwired EMACs. We leave the current check for an "unused" property
to maintain backwards compatibility for older device trees. Newer device
trees should simply use the standard "status" property in the EMAC node.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index c30348e402d5..7c66727359d4 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2562,8 +2562,11 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2562 | struct device_node **blist = NULL; | 2562 | struct device_node **blist = NULL; |
2563 | int err, i; | 2563 | int err, i; |
2564 | 2564 | ||
2565 | /* Skip unused/unwired EMACS */ | 2565 | /* Skip unused/unwired EMACS. We leave the check for an unused |
2566 | if (of_get_property(np, "unused", NULL)) | 2566 | * property here for now, but new flat device trees should set a |
2567 | * status property to "disabled" instead. | ||
2568 | */ | ||
2569 | if (of_get_property(np, "unused", NULL) || !of_device_is_available(np)) | ||
2567 | return -ENODEV; | 2570 | return -ENODEV; |
2568 | 2571 | ||
2569 | /* Find ourselves in the bootlist if we are there */ | 2572 | /* Find ourselves in the bootlist if we are there */ |