diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-01-04 01:03:16 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-01-09 01:03:03 -0500 |
commit | 8404e654300cb807428b839d5ae56fd45b5acb92 (patch) | |
tree | 452d2bfca48f7029b30dca758e43501fa879257f /arch/powerpc/platforms | |
parent | d9523aa157e9fbb93467dcd0d1bed9604153bf7f (diff) |
[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>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/iseries/proc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c index c241413629ac..b54e37101e69 100644 --- a/arch/powerpc/platforms/iseries/proc.c +++ b/arch/powerpc/platforms/iseries/proc.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
25 | #include <asm/time.h> | 25 | #include <asm/time.h> |
26 | #include <asm/lppaca.h> | 26 | #include <asm/lppaca.h> |
27 | #include <asm/firmware.h> | ||
27 | #include <asm/iseries/hv_call_xm.h> | 28 | #include <asm/iseries/hv_call_xm.h> |
28 | 29 | ||
29 | #include "processor_vpd.h" | 30 | #include "processor_vpd.h" |
@@ -31,7 +32,12 @@ | |||
31 | 32 | ||
32 | static int __init iseries_proc_create(void) | 33 | static int __init iseries_proc_create(void) |
33 | { | 34 | { |
34 | struct proc_dir_entry *e = proc_mkdir("iSeries", 0); | 35 | struct proc_dir_entry *e; |
36 | |||
37 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
38 | return 0; | ||
39 | |||
40 | e = proc_mkdir("iSeries", 0); | ||
35 | if (!e) | 41 | if (!e) |
36 | return 1; | 42 | return 1; |
37 | 43 | ||
@@ -106,6 +112,9 @@ static int __init iseries_proc_init(void) | |||
106 | { | 112 | { |
107 | struct proc_dir_entry *e; | 113 | struct proc_dir_entry *e; |
108 | 114 | ||
115 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
116 | return 0; | ||
117 | |||
109 | e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL); | 118 | e = create_proc_entry("iSeries/titanTod", S_IFREG|S_IRUGO, NULL); |
110 | if (e) | 119 | if (e) |
111 | e->proc_fops = &proc_titantod_operations; | 120 | e->proc_fops = &proc_titantod_operations; |