Skip to content

Commit

Permalink
[IA64] mbcs_init() should give up unless running on sn2
Browse files Browse the repository at this point in the history
CONFIG_SGI_MBCS is enabled in generic kernels, but the driver may
oops some other platforms.  Check whether we are running on sn2
and bail out if we are not before doing anything dangerous.

Acked-by: Bruce Losure <blosure@americas.sgi.com>
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 Oct 4, 2005
1 parent ed39f73 commit 96f339c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/mbcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ static int __init mbcs_init(void)
{
int rv;

if (!ia64_platform_is("sn2"))
return -ENODEV;

// Put driver into chrdevs[]. Get major number.
rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops);
if (rv < 0) {
Expand Down

0 comments on commit 96f339c

Please sign in to comment.