]> err.no Git - linux-2.6/commitdiff
[POWERPC] iSeries: fix viotape init
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 15 Dec 2006 04:41:43 +0000 (15:41 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 20 Dec 2006 05:37:47 +0000 (16:37 +1100)
Only initialise viotape on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/char/viotape.c

index 94d79cb8ce8d559ac4690eabb7e30f7ad1cb00d2..9438512b17f1d593d119753d0def60be2b536cda 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
-
+#include <asm/firmware.h>
 #include <asm/vio.h>
 #include <asm/iseries/vio.h>
 #include <asm/iseries/hv_lp_event.h>
@@ -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");