From fd38451f1512fd5230e3c5dcc66d1ca867af879b Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 15 Dec 2006 15:41:43 +1100 Subject: [POWERPC] iSeries: fix viotape init Only initialise viotape on legacy iSeries. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- drivers/char/viotape.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/char') diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 94d79cb8ce8..9438512b17f 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -49,7 +49,7 @@ #include #include - +#include #include #include #include @@ -997,6 +997,9 @@ int __init viotap_init(void) int ret; struct proc_dir_entry *e; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -ENODEV; + op_struct_list = NULL; if ((ret = add_op_structs(VIOTAPE_MAXREQ)) < 0) { printk(VIOTAPE_KERN_WARN "couldn't allocate op structs\n"); -- cgit v1.2.3-70-g09d2 From 94c8f9f974f2ad29b90b2830b189d74a633fef49 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 15 Dec 2006 15:45:13 +1100 Subject: [POWERPC] iSeries: fix viocons init Only initialise viocons on legacy iSeries. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- drivers/char/viocons.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/char') diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 0e0da443cbd..8de6b95aeb8 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -1060,6 +1061,9 @@ static int __init viocons_init2(void) atomic_t wait_flag; int rc; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -ENODEV; + /* +2 for fudge */ rc = viopath_open(HvLpConfig_getPrimaryLpIndex(), viomajorsubtype_chario, VIOCHAR_WINDOW + 2); @@ -1145,6 +1149,9 @@ static int __init viocons_init(void) { int i; + if (!firmware_has_feature(FW_FEATURE_ISERIES)) + return -ENODEV; + printk(VIOCONS_KERN_INFO "registering console\n"); for (i = 0; i < VTTY_PORTS; i++) { port_info[i].lp = HvLpIndexInvalid; -- cgit v1.2.3-70-g09d2