Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96f339c6 authored by Greg Edwards's avatar Greg Edwards Committed by Tony Luck
Browse files

[IA64] mbcs_init() should give up unless running on sn2



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: default avatarBruce Losure <blosure@americas.sgi.com>
Signed-off-by: default avatarGreg Edwards <edwardsg@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ed39f731
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {