summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh.c
diff options
context:
space:
mode:
authorNathan Lynch <ntl@pobox.com>2008-03-14 06:52:10 +1100
committerPaul Mackerras <paulus@samba.org>2008-04-07 13:49:25 +1000
commitc6d4d5a8a83e4a564bcf233fdd565183c33df5d1 (patch)
tree801bfb328121f02df9e78380eb25f325ea2a41cb /arch/powerpc/platforms/pseries/eeh.c
parent834d97d452208279edf11c57eca150360d2dd1d6 (diff)
downloadkernel-crypto-c6d4d5a8a83e4a564bcf233fdd565183c33df5d1.tar.gz
kernel-crypto-c6d4d5a8a83e4a564bcf233fdd565183c33df5d1.tar.xz
kernel-crypto-c6d4d5a8a83e4a564bcf233fdd565183c33df5d1.zip
[POWERPC] Convert pci and eeh code to of_device_is_available
A couple of places are duplicating the function of of_device_is_available; convert them to use it. Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 9eb539ee5f9..550b2f7d2cc 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -945,7 +945,6 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
unsigned int rets[3];
struct eeh_early_enable_info *info = data;
int ret;
- const char *status = of_get_property(dn, "status", NULL);
const u32 *class_code = of_get_property(dn, "class-code", NULL);
const u32 *vendor_id = of_get_property(dn, "vendor-id", NULL);
const u32 *device_id = of_get_property(dn, "device-id", NULL);
@@ -959,8 +958,8 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
pdn->eeh_freeze_count = 0;
pdn->eeh_false_positives = 0;
- if (status && strncmp(status, "ok", 2) != 0)
- return NULL; /* ignore devices with bad status */
+ if (!of_device_is_available(dn))
+ return NULL;
/* Ignore bad nodes. */
if (!class_code || !vendor_id || !device_id)