aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/char/vmur.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c
index 9020eba620ee..5dcef81fc9d9 100644
--- a/drivers/s390/char/vmur.c
+++ b/drivers/s390/char/vmur.c
@@ -8,6 +8,9 @@
8 * Frank Munzert <munzert@de.ibm.com> 8 * Frank Munzert <munzert@de.ibm.com>
9 */ 9 */
10 10
11#define KMSG_COMPONENT "vmur"
12#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13
11#include <linux/cdev.h> 14#include <linux/cdev.h>
12#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
13 16
@@ -40,8 +43,6 @@ MODULE_AUTHOR("IBM Corporation");
40MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver"); 43MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver");
41MODULE_LICENSE("GPL"); 44MODULE_LICENSE("GPL");
42 45
43#define PRINTK_HEADER "vmur: "
44
45static dev_t ur_first_dev_maj_min; 46static dev_t ur_first_dev_maj_min;
46static struct class *vmur_class; 47static struct class *vmur_class;
47static struct debug_info *vmur_dbf; 48static struct debug_info *vmur_dbf;
@@ -987,7 +988,8 @@ static int __init ur_init(void)
987 dev_t dev; 988 dev_t dev;
988 989
989 if (!MACHINE_IS_VM) { 990 if (!MACHINE_IS_VM) {
990 PRINT_ERR("%s is only available under z/VM.\n", ur_banner); 991 pr_err("The %s cannot be loaded without z/VM\n",
992 ur_banner);
991 return -ENODEV; 993 return -ENODEV;
992 } 994 }
993 995
@@ -1006,7 +1008,8 @@ static int __init ur_init(void)
1006 1008
1007 rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur"); 1009 rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur");
1008 if (rc) { 1010 if (rc) {
1009 PRINT_ERR("alloc_chrdev_region failed: err = %d\n", rc); 1011 pr_err("Kernel function alloc_chrdev_region failed with "
1012 "error code %d\n", rc);
1010 goto fail_unregister_driver; 1013 goto fail_unregister_driver;
1011 } 1014 }
1012 ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0); 1015 ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0);
@@ -1016,7 +1019,7 @@ static int __init ur_init(void)
1016 rc = PTR_ERR(vmur_class); 1019 rc = PTR_ERR(vmur_class);
1017 goto fail_unregister_region; 1020 goto fail_unregister_region;
1018 } 1021 }
1019 PRINT_INFO("%s loaded.\n", ur_banner); 1022 pr_info("%s loaded.\n", ur_banner);
1020 return 0; 1023 return 0;
1021 1024
1022fail_unregister_region: 1025fail_unregister_region:
@@ -1034,7 +1037,7 @@ static void __exit ur_exit(void)
1034 unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS); 1037 unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS);
1035 ccw_driver_unregister(&ur_driver); 1038 ccw_driver_unregister(&ur_driver);
1036 debug_unregister(vmur_dbf); 1039 debug_unregister(vmur_dbf);
1037 PRINT_INFO("%s unloaded.\n", ur_banner); 1040 pr_info("%s unloaded.\n", ur_banner);
1038} 1041}
1039 1042
1040module_init(ur_init); 1043module_init(ur_init);