diff options
Diffstat (limited to 'drivers/s390/char/vmcp.c')
-rw-r--r-- | drivers/s390/char/vmcp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 09e7d9bf438b..a6087cec55b4 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c | |||
@@ -11,12 +11,14 @@ | |||
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 | |||
14 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
15 | #include <linux/init.h> | 18 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
17 | #include <linux/miscdevice.h> | 20 | #include <linux/miscdevice.h> |
18 | #include <linux/module.h> | 21 | #include <linux/module.h> |
19 | #include <linux/smp_lock.h> | ||
20 | #include <asm/cpcmd.h> | 22 | #include <asm/cpcmd.h> |
21 | #include <asm/debug.h> | 23 | #include <asm/debug.h> |
22 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
@@ -26,8 +28,6 @@ MODULE_LICENSE("GPL"); | |||
26 | MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>"); | 28 | MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>"); |
27 | MODULE_DESCRIPTION("z/VM CP interface"); | 29 | MODULE_DESCRIPTION("z/VM CP interface"); |
28 | 30 | ||
29 | #define PRINTK_HEADER "vmcp: " | ||
30 | |||
31 | static debug_info_t *vmcp_debug; | 31 | static debug_info_t *vmcp_debug; |
32 | 32 | ||
33 | static int vmcp_open(struct inode *inode, struct file *file) | 33 | static int vmcp_open(struct inode *inode, struct file *file) |
@@ -41,13 +41,11 @@ static int vmcp_open(struct inode *inode, struct file *file) | |||
41 | if (!session) | 41 | if (!session) |
42 | return -ENOMEM; | 42 | return -ENOMEM; |
43 | 43 | ||
44 | lock_kernel(); | ||
45 | session->bufsize = PAGE_SIZE; | 44 | session->bufsize = PAGE_SIZE; |
46 | session->response = NULL; | 45 | session->response = NULL; |
47 | session->resp_size = 0; | 46 | session->resp_size = 0; |
48 | mutex_init(&session->mutex); | 47 | mutex_init(&session->mutex); |
49 | file->private_data = session; | 48 | file->private_data = session; |
50 | unlock_kernel(); | ||
51 | return nonseekable_open(inode, file); | 49 | return nonseekable_open(inode, file); |
52 | } | 50 | } |
53 | 51 | ||
@@ -193,7 +191,8 @@ static int __init vmcp_init(void) | |||
193 | int ret; | 191 | int ret; |
194 | 192 | ||
195 | if (!MACHINE_IS_VM) { | 193 | if (!MACHINE_IS_VM) { |
196 | PRINT_WARN("z/VM CP interface is only available under z/VM\n"); | 194 | pr_warning("The z/VM CP interface device driver cannot be " |
195 | "loaded without z/VM\n"); | ||
197 | return -ENODEV; | 196 | return -ENODEV; |
198 | } | 197 | } |
199 | 198 | ||