mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
ca75d601b5
commit
d6a38c0ba7
4 changed files with 4 additions and 96 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue