X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Fhvc_iseries.c;h=f144a947bd17aaa8549230e307c13def30296822;hb=5a84d159061d914c8dd4aa372ac6e9529c2be453;hp=8b6f197e5f8cbce32a307bec1be4d66846b43103;hpb=6f3a28f7d1f0a65a78443c273b6e8ec01becf301;p=linux-2.6 diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index 8b6f197e5f..f144a947bd 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -488,6 +489,9 @@ static int hvc_vio_init(void) atomic_t wait_flag; int rc; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -EIO; + /* +2 for fudge */ rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), viomajorsubtype_chario, VIOCHAR_WINDOW + 2); @@ -562,7 +566,7 @@ static int hvc_find_vtys(void) for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL; vty = of_find_node_by_name(vty, "vty")) { - uint32_t *vtermno; + const uint32_t *vtermno; /* We have statically defined space for only a certain number * of console adapters. @@ -571,7 +575,7 @@ static int hvc_find_vtys(void) (num_found >= VTTY_PORTS)) break; - vtermno = (uint32_t *)get_property(vty, "reg", NULL); + vtermno = get_property(vty, "reg", NULL); if (!vtermno) continue;