aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/nfcmrvl
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-05-31 09:38:56 +0200
committerJakub Kicinski <kuba@kernel.org>2021-05-31 21:32:37 -0700
commite3bf5531e6e6d5a7a498cb21079a135726fd7fb8 (patch)
treeaf9c61230f16b3f94c247709d0ca8dfa646b98e6 /drivers/nfc/nfcmrvl
parentnfc: mrvl: correct minor coding style violations (diff)
downloadlinux-dev-e3bf5531e6e6d5a7a498cb21079a135726fd7fb8.tar.xz
linux-dev-e3bf5531e6e6d5a7a498cb21079a135726fd7fb8.zip
nfc: mrvl: simplify with module_driver
Remove standard module init/exit boilerplate with module_driver() which also annotates the functions with __init. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210531073902.7111-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/nfc/nfcmrvl')
-rw-r--r--drivers/nfc/nfcmrvl/uart.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c
index ed85645eb885..50d86c90b9dd 100644
--- a/drivers/nfc/nfcmrvl/uart.c
+++ b/drivers/nfc/nfcmrvl/uart.c
@@ -189,23 +189,7 @@ static struct nci_uart nfcmrvl_nci_uart = {
.tx_done = nfcmrvl_nci_uart_tx_done,
}
};
-
-/*
-** Module init
-*/
-
-static int nfcmrvl_uart_init_module(void)
-{
- return nci_uart_register(&nfcmrvl_nci_uart);
-}
-
-static void nfcmrvl_uart_exit_module(void)
-{
- nci_uart_unregister(&nfcmrvl_nci_uart);
-}
-
-module_init(nfcmrvl_uart_init_module);
-module_exit(nfcmrvl_uart_exit_module);
+module_driver(nfcmrvl_nci_uart, nci_uart_register, nci_uart_unregister);
MODULE_AUTHOR("Marvell International Ltd.");
MODULE_DESCRIPTION("Marvell NFC-over-UART");