aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/mbcs.c
diff options
context:
space:
mode:
authorGreg Edwards <edwardsg@sgi.com>2005-09-28 18:05:19 -0400
committerTony Luck <tony.luck@intel.com>2005-10-04 12:39:18 -0400
commit96f339c6b95344942fe5fce012ff4f2a3b2cb80d (patch)
treec83a3ecd44d161becb4fe29cbbcdffc6f2f29dbb /drivers/char/mbcs.c
parented39f731ab2e77e58122232f6e27333331d7793d (diff)
[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>
Diffstat (limited to 'drivers/char/mbcs.c')
-rw-r--r--drivers/char/mbcs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 3fa64c631108..c268ee04b2aa 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -830,6 +830,9 @@ static int __init mbcs_init(void)
830{ 830{
831 int rv; 831 int rv;
832 832
833 if (!ia64_platform_is("sn2"))
834 return -ENODEV;
835
833 // Put driver into chrdevs[]. Get major number. 836 // Put driver into chrdevs[]. Get major number.
834 rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops); 837 rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops);
835 if (rv < 0) { 838 if (rv < 0) {