diff options
author | Greg Edwards <edwardsg@sgi.com> | 2006-07-28 10:03:55 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-08-02 16:07:55 -0700 |
commit | c7c17423b9ea3c5559cfb480a00844f1df9eed06 (patch) | |
tree | 5f50f263dff32369da1d14a1127f55ec141e28d4 /drivers/char/snsc.c | |
parent | e037cda559547e6353c5a792802963572d0b750e (diff) |
[IA64] add platform check to snsc driver init
Add a platform check to the snsc driver init function, to prevent
loading on non-sn2 systems.
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/char/snsc.c')
-rw-r--r-- | drivers/char/snsc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c index afc6eda602f..07e0b75f233 100644 --- a/drivers/char/snsc.c +++ b/drivers/char/snsc.c @@ -374,7 +374,12 @@ scdrv_init(void) struct sysctl_data_s *scd; void *salbuf; dev_t first_dev, dev; - nasid_t event_nasid = ia64_sn_get_console_nasid(); + nasid_t event_nasid; + + if (!ia64_platform_is("sn2")) + return -ENODEV; + + event_nasid = ia64_sn_get_console_nasid(); if (alloc_chrdev_region(&first_dev, 0, num_cnodes, SYSCTL_BASENAME) < 0) { |