From d22f7516e95269bc1e53fd8b1ae838616f8e39db Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Mon, 25 Sep 2006 13:30:51 +1000 Subject: [PATCH] --- yaml --- r: 38490 b: refs/heads/master c: de0138da0f8cf406c096daec7494a5cbebce2e5c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/char/hvc_iseries.c | 8 ++++++-- trunk/drivers/char/hvc_vio.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 70c1c16fe67d..15990816985a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef26a46f8c501f6888cc78bcc4a2dc1efea1e733 +refs/heads/master: de0138da0f8cf406c096daec7494a5cbebce2e5c diff --git a/trunk/drivers/char/hvc_iseries.c b/trunk/drivers/char/hvc_iseries.c index 4747729459c7..ea362011bd5b 100644 --- a/trunk/drivers/char/hvc_iseries.c +++ b/trunk/drivers/char/hvc_iseries.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -493,6 +494,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); @@ -567,7 +571,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. @@ -576,7 +580,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; diff --git a/trunk/drivers/char/hvc_vio.c b/trunk/drivers/char/hvc_vio.c index cc95941148fb..f9c00844d2bf 100644 --- a/trunk/drivers/char/hvc_vio.c +++ b/trunk/drivers/char/hvc_vio.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "hvc_console.h" @@ -120,6 +121,9 @@ static int hvc_vio_init(void) { int rc; + if (firmware_has_feature(FW_FEATURE_ISERIES)) + return -EIO; + /* Register as a vio device to receive callbacks */ rc = vio_register_driver(&hvc_vio_driver);