From: Dean Nelson Date: Thu, 8 Sep 2005 15:46:58 +0000 (-0500) Subject: [IA64] ensure XPC and XPNET are loaded on sn2 platforms only X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=408865ce4829376120489ac8011b72125453dcff;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [IA64] ensure XPC and XPNET are loaded on sn2 platforms only These are SN2 only drivers. They should have platform checks to prevent them from doing evil stuff in GENERIC kernels. Signed-off-by: Martin Hicks Acked-by: Dean Nelson Signed-off-by: Tony Luck --- diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index bb1d5cf30440..ed7c21586e98 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c @@ -885,6 +885,10 @@ xpc_init(void) pid_t pid; + if (!ia64_platform_is("sn2")) { + return -ENODEV; + } + /* * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng * both a partition's reserved page and its XPC variables. Its size was diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c index 78c13d676fa6..d0c2c114a459 100644 --- a/arch/ia64/sn/kernel/xpnet.c +++ b/arch/ia64/sn/kernel/xpnet.c @@ -636,6 +636,10 @@ xpnet_init(void) int result = -ENOMEM; + if (!ia64_platform_is("sn2")) { + return -ENODEV; + } + dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME); /*