Skip to content

Commit

Permalink
[S390] Cleanup vmcp printk messages.
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
Christian Borntraeger authored and Heiko Carstens committed Jul 14, 2008
1 parent 6b64806 commit a44008f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/s390/char/vmcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,35 +192,30 @@ static int __init vmcp_init(void)
PRINT_WARN("z/VM CP interface is only available under z/VM\n");
return -ENODEV;
}

vmcp_debug = debug_register("vmcp", 1, 1, 240);
if (!vmcp_debug) {
PRINT_ERR("z/VM CP interface not loaded. Could not register "
"debug feature\n");
if (!vmcp_debug)
return -ENOMEM;
}

ret = debug_register_view(vmcp_debug, &debug_hex_ascii_view);
if (ret) {
PRINT_ERR("z/VM CP interface not loaded. Could not register "
"debug feature view. Error code: %d\n", ret);
debug_unregister(vmcp_debug);
return ret;
}

ret = misc_register(&vmcp_dev);
if (ret) {
PRINT_ERR("z/VM CP interface not loaded. Could not register "
"misc device. Error code: %d\n", ret);
debug_unregister(vmcp_debug);
return ret;
}
PRINT_INFO("z/VM CP interface loaded\n");

return 0;
}

static void __exit vmcp_exit(void)
{
misc_deregister(&vmcp_dev);
debug_unregister(vmcp_debug);
PRINT_INFO("z/VM CP interface unloaded.\n");
}

module_init(vmcp_init);
Expand Down

0 comments on commit a44008f

Please sign in to comment.