]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] mbcs_init() should give up unless running on sn2
authorGreg Edwards <edwardsg@sgi.com>
Wed, 28 Sep 2005 22:05:19 +0000 (17:05 -0500)
committerTony Luck <tony.luck@intel.com>
Tue, 4 Oct 2005 16:39:18 +0000 (09:39 -0700)
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>
drivers/char/mbcs.c

index 3fa64c63110864597f6fb5d32a3d40ebe0d84384..c268ee04b2aa31d40db4bf58931d1bef75f7b0ad 100644 (file)
@@ -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) {