diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2010-05-17 04:00:06 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-17 04:00:15 -0400 |
commit | f73a2b03c59b95a3ee8eebcc127350c77c950e87 (patch) | |
tree | c05dd09587746a1857e222d39b89865d1172009b /drivers/s390/char/vmcp.c | |
parent | 86f2552bbd0e17b19bb5e9881042533eaea553c7 (diff) |
[S390] vmcp: disallow modular build
Change the tristate Kbuild option into a bool option so that the module
is either builtin or not available at all.
There have been too many cases where people were missing the 'vmcp'
device node and unable to send z/VM CP commands. So let's make sure
that on distros it will always be present.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/vmcp.c')
-rw-r--r-- | drivers/s390/char/vmcp.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 5bb59d36a6d4..04e532eec032 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -1,24 +1,20 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright IBM Corp. 2004,2007 | 2 | * Copyright IBM Corp. 2004,2010 |
3 | * Interface implementation for communication with the z/VM control program | 3 | * Interface implementation for communication with the z/VM control program |
4 | * Author(s): Christian Borntraeger <borntraeger@de.ibm.com> | ||
5 | * | 4 | * |
5 | * Author(s): Christian Borntraeger <borntraeger@de.ibm.com> | ||
6 | * | 6 | * |
7 | * z/VMs CP offers the possibility to issue commands via the diagnose code 8 | 7 | * z/VMs CP offers the possibility to issue commands via the diagnose code 8 |
8 | * this driver implements a character device that issues these commands and | 8 | * this driver implements a character device that issues these commands and |
9 | * returns the answer of CP. | 9 | * returns the answer of CP. |
10 | 10 | * | |
11 | * The idea of this driver is based on cpint from Neale Ferguson and #CP in CMS | 11 | * The idea of this driver is based on cpint from Neale Ferguson and #CP in CMS |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define KMSG_COMPONENT "vmcp" | ||
15 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
16 | |||
17 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
18 | #include <linux/init.h> | 15 | #include <linux/init.h> |
19 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
20 | #include <linux/miscdevice.h> | 17 | #include <linux/miscdevice.h> |
21 | #include <linux/module.h> | ||
22 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
23 | #include <asm/compat.h> | 19 | #include <asm/compat.h> |
24 | #include <asm/cpcmd.h> | 20 | #include <asm/cpcmd.h> |
@@ -26,10 +22,6 @@ | |||
26 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
27 | #include "vmcp.h" | 23 | #include "vmcp.h" |
28 | 24 | ||
29 | MODULE_LICENSE("GPL"); | ||
30 | MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>"); | ||
31 | MODULE_DESCRIPTION("z/VM CP interface"); | ||
32 | |||
33 | static debug_info_t *vmcp_debug; | 25 | static debug_info_t *vmcp_debug; |
34 | 26 | ||
35 | static int vmcp_open(struct inode *inode, struct file *file) | 27 | static int vmcp_open(struct inode *inode, struct file *file) |
@@ -197,11 +189,8 @@ static int __init vmcp_init(void) | |||
197 | { | 189 | { |
198 | int ret; | 190 | int ret; |
199 | 191 | ||
200 | if (!MACHINE_IS_VM) { | 192 | if (!MACHINE_IS_VM) |
201 | pr_warning("The z/VM CP interface device driver cannot be " | 193 | return 0; |
202 | "loaded without z/VM\n"); | ||
203 | return -ENODEV; | ||
204 | } | ||
205 | 194 | ||
206 | vmcp_debug = debug_register("vmcp", 1, 1, 240); | 195 | vmcp_debug = debug_register("vmcp", 1, 1, 240); |
207 | if (!vmcp_debug) | 196 | if (!vmcp_debug) |
@@ -214,19 +203,8 @@ static int __init vmcp_init(void) | |||
214 | } | 203 | } |
215 | 204 | ||
216 | ret = misc_register(&vmcp_dev); | 205 | ret = misc_register(&vmcp_dev); |
217 | if (ret) { | 206 | if (ret) |
218 | debug_unregister(vmcp_debug); | 207 | debug_unregister(vmcp_debug); |
219 | return ret; | 208 | return ret; |
220 | } | ||
221 | |||
222 | return 0; | ||
223 | } | ||
224 | |||
225 | static void __exit vmcp_exit(void) | ||
226 | { | ||
227 | misc_deregister(&vmcp_dev); | ||
228 | debug_unregister(vmcp_debug); | ||
229 | } | 209 | } |
230 | 210 | device_initcall(vmcp_init); | |
231 | module_init(vmcp_init); | ||
232 | module_exit(vmcp_exit); | ||