summaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>2016-08-25 22:30:50 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 14:12:35 +0200
commitd6a38c0ba778abd6683858bfd7c768f7edab2ebb (patch)
treec551509f81466432748179919b33775292e24abc /arch/um
parentca75d601b5942e8cf5eed68f308be0526d0dac5d (diff)
downloadlinux-d6a38c0ba778abd6683858bfd7c768f7edab2ebb.tar.gz
linux-d6a38c0ba778abd6683858bfd7c768f7edab2ebb.tar.xz
miscdevice: Use module_misc_device() macro
This patch removes module_init()/module_exit() from driver code by using module_misc_device() macro. All modules in this patch has a print statement which is removed when module_misc_device() macro is used. If undesirable this patch can be dropped entirely, this is the only purpose of making this as a separate patch. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/harddog_kern.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c
index 2d0266d0254d..3282787bbcfb 100644
--- a/arch/um/drivers/harddog_kern.c
+++ b/arch/um/drivers/harddog_kern.c
@@ -175,27 +175,4 @@ static struct miscdevice harddog_miscdev = {
.name = "watchdog",
.fops = &harddog_fops,
};
-
-static char banner[] __initdata = KERN_INFO "UML Watchdog Timer\n";
-
-static int __init harddog_init(void)
-{
- int ret;
-
- ret = misc_register(&harddog_miscdev);
-
- if (ret)
- return ret;
-
- printk(banner);
-
- return 0;
-}
-
-static void __exit harddog_exit(void)
-{
- misc_deregister(&harddog_miscdev);
-}
-
-module_init(harddog_init);
-module_exit(harddog_exit);
+module_misc_device(harddog_miscdev);