[POWERPC] iSeries: fix viopath initialisation
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Jan 2007 06:05:13 +0000 (17:05 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 9 Jan 2007 06:03:03 +0000 (17:03 +1100)
/proc/iSeries/config should only be created if we are running on legacy
iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/iseries/viopath.c

index 84e7ee2c086f59f21bec9a99b0ce368b07b11676..a6799ed34a66c07555c71e910586328112eb8f79 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/prom.h>
+#include <asm/firmware.h>
 #include <asm/iseries/hv_types.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_lp_config.h>
@@ -183,6 +184,9 @@ static int __init vio_proc_init(void)
 {
        struct proc_dir_entry *e;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return 0;
+
        e = create_proc_entry("iSeries/config", 0, NULL);
        if (e)
                e->proc_fops = &proc_viopath_operations;