Skip to content

Commit

Permalink
[POWERPC] iSeries: fix proc/iSeries initialisation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Jan 9, 2007
1 parent d9523aa commit 8404e65
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion arch/powerpc/platforms/iseries/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,20 @@
#include <asm/processor.h>
#include <asm/time.h>
#include <asm/lppaca.h>
#include <asm/firmware.h>
#include <asm/iseries/hv_call_xm.h>

#include "processor_vpd.h"
#include "main_store.h"

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)
return 1;

Expand Down Expand Up @@ -106,6 +112,9 @@ static int __init iseries_proc_init(void)
{
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);
if (e)
e->proc_fops = &proc_titantod_operations;
Expand Down

0 comments on commit 8404e65

Please sign in to comment.