Skip to content

Commit

Permalink
[IA64] add platform check to snsc driver init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Edwards authored and Tony Luck committed Aug 2, 2006
1 parent e037cda commit c7c1742
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/char/snsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c7c1742

Please sign in to comment.