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: Li Zetao <lizetao1@huawei.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bc02fc7990
commit
61a9b174f4
|
@ -200,18 +200,7 @@ static struct miscdevice miscdev = {
|
|||
.mode = 0600,
|
||||
};
|
||||
|
||||
static int __init virtual_ncidev_init(void)
|
||||
{
|
||||
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_misc_device(miscdev);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Virtual NCI device simulation driver");
|
||||
|
|
Loading…
Reference in New Issue