Skip to content

Commit 96f339c

Browse files
Greg Edwardsaegl
authored andcommitted
[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: Bruce Losure <blosure@americas.sgi.com> Signed-off-by: Greg Edwards <edwardsg@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
1 parent ed39f73 commit 96f339c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/char/mbcs.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,9 @@ static int __init mbcs_init(void)
830830
{
831831
int rv;
832832

833+
if (!ia64_platform_is("sn2"))
834+
return -ENODEV;
835+
833836
// Put driver into chrdevs[]. Get major number.
834837
rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops);
835838
if (rv < 0) {

0 commit comments

Comments
 (0)