From 752e1074a3fa3031258b4bed0e53c44e4dee0426 Mon Sep 17 00:00:00 2001 From: Fei Yang Date: Mon, 12 Sep 2011 15:01:37 -0700 Subject: [PATCH] linux-2.6.36-intel-scu-ipcutil-allow-ipcutil-compile-as-module.patch Change-Id: I168b5e7d3d6df31908a2edfaa821815b6dbe8bae Signed-off-by: Fei Yang --- drivers/platform/x86/intel_scu_ipcutil.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel_scu_ipcutil.c b/drivers/platform/x86/intel_scu_ipcutil.c index 4512a48..dd99572 100644 --- a/drivers/platform/x86/intel_scu_ipcutil.c +++ b/drivers/platform/x86/intel_scu_ipcutil.c @@ -24,13 +24,12 @@ #include #include #include +#include #include #include #include #include -static u32 major; - #define MAX_FW_SIZE 264192 /* ioctl commnds */ @@ -220,14 +219,20 @@ static const struct file_operations scu_ipc_fops = { .unlocked_ioctl = scu_ipc_ioctl, }; +static struct miscdevice scu_ipcutil = { + .minor = MISC_DYNAMIC_MINOR, + .name = "mid_ipc", + .fops = &scu_ipc_fops, +}; + static int __init ipc_module_init(void) { - return register_chrdev(0, "intel_mid_scu", &scu_ipc_fops); + return misc_register(&scu_ipcutil); } static void __exit ipc_module_exit(void) { - unregister_chrdev(major, "intel_mid_scu"); + misc_deregister(&scu_ipcutil); } module_init(ipc_module_init); -- 2.7.4