nfc: virtual_ncidev: Use module_misc_device macro to simplify the code
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/nfc/virtual_ncidev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/nfc/virtual_ncidev.c +1 -12
@@ -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" );
Signature · 1 line
2.34.1
Quoted 8 lines · Li Zetao
Use the
module_misc_devicemacro to simplify the code, which is the same as declaring withmodule_init()andmodule_exit().Signed-off-by Li Zetao <[email protected]>--- drivers/nfc/virtual_ncidev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
Reviewed-by Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 7 lines · On Tue, 15 Aug 2023 15:49:27 +0800 you wrote:
Use the
module_misc_devicemacro to simplify the code, which is the same as declaring withmodule_init()andmodule_exit().Signed-off-by Li Zetao <[email protected]>--- drivers/nfc/virtual_ncidev.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
Here is the summary with links:
- [-next] nfc: virtual_ncidev: Use module_misc_device macro to simplify the code
https://git.kernel.org/netdev/net-next/c/61a9b174f461
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html