]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/pseries/eeh.c
[POWERPC] Convert pci and eeh code to of_device_is_available
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / pseries / eeh.c
index 9eb539ee5f9a1c05b7262637fe764736431ab0d7..550b2f7d2cc1ee8ed59b5a91f0a334f3402be80e 100644 (file)
@@ -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)