浏览代码

[POWERPC] iSeries: fix proc/iSeries initialisation

These proc files 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>
Stephen Rothwell 18 年之前
父节点
当前提交
8404e65430
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      arch/powerpc/platforms/iseries/proc.c

+ 10 - 1
arch/powerpc/platforms/iseries/proc.c

@@ -24,6 +24,7 @@
 #include <asm/processor.h>
 #include <asm/processor.h>
 #include <asm/time.h>
 #include <asm/time.h>
 #include <asm/lppaca.h>
 #include <asm/lppaca.h>
+#include <asm/firmware.h>
 #include <asm/iseries/hv_call_xm.h>
 #include <asm/iseries/hv_call_xm.h>
 
 
 #include "processor_vpd.h"
 #include "processor_vpd.h"
@@ -31,7 +32,12 @@
 
 
 static int __init iseries_proc_create(void)
 static int __init iseries_proc_create(void)
 {
 {
-	struct proc_dir_entry *e = proc_mkdir("iSeries", 0);
+	struct proc_dir_entry *e;
+
+	if (!firmware_has_feature(FW_FEATURE_ISERIES))
+		return 0;
+
+	e = proc_mkdir("iSeries", 0);
 	if (!e)
 	if (!e)
 		return 1;
 		return 1;
 
 
@@ -106,6 +112,9 @@ static int __init iseries_proc_init(void)
 {
 {
 	struct proc_dir_entry *e;
 	struct proc_dir_entry *e;
 
 
+	if (!firmware_has_feature(FW_FEATURE_ISERIES))
+		return 0;
+
 	e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL);
 	e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL);
 	if (e)
 	if (e)
 		e->proc_fops = &proc_titantod_operations;
 		e->proc_fops = &proc_titantod_operations;