Browse Source

[POWERPC] iSeries: fix lpevents initialisation

/proc/iSeries/lpevents 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 years ago
parent
commit
13d2c9bbb0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      arch/powerpc/platforms/iseries/lpevents.c

+ 4 - 0
arch/powerpc/platforms/iseries/lpevents.c

@@ -17,6 +17,7 @@
 
 
 #include <asm/system.h>
 #include <asm/system.h>
 #include <asm/paca.h>
 #include <asm/paca.h>
+#include <asm/firmware.h>
 #include <asm/iseries/it_lp_queue.h>
 #include <asm/iseries/it_lp_queue.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_lp_event.h>
 #include <asm/iseries/hv_call_event.h>
 #include <asm/iseries/hv_call_event.h>
@@ -318,6 +319,9 @@ static int __init proc_lpevents_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/lpevents", S_IFREG|S_IRUGO, NULL);
 	e = create_proc_entry("iSeries/lpevents", S_IFREG|S_IRUGO, NULL);
 	if (e)
 	if (e)
 		e->proc_fops = &proc_lpevents_operations;
 		e->proc_fops = &proc_lpevents_operations;