提交 96f339c6 编写于 作者: G Greg Edwards 提交者: Tony Luck

[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: NBruce Losure <blosure@americas.sgi.com>
Signed-off-by: NGreg Edwards <edwardsg@sgi.com>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 ed39f731
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册