Commit 61a9b174 authored by Li Zetao's avatar Li Zetao Committed by David S. Miller

nfc: virtual_ncidev: Use module_misc_device macro to simplify the code

Use the module_misc_device macro to simplify the code, which is the
same as declaring with module_init() and module_exit().
Signed-off-by: default avatarLi Zetao <lizetao1@huawei.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc02fc79
...@@ -200,18 +200,7 @@ static struct miscdevice miscdev = { ...@@ -200,18 +200,7 @@ static struct miscdevice miscdev = {
.mode = 0600, .mode = 0600,
}; };
static int __init virtual_ncidev_init(void) module_misc_device(miscdev);
{
return misc_register(&miscdev);
}
static void __exit virtual_ncidev_exit(void)
{
misc_deregister(&miscdev);
}
module_init(virtual_ncidev_init);
module_exit(virtual_ncidev_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Virtual NCI device simulation driver"); MODULE_DESCRIPTION("Virtual NCI device simulation driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment