Skip to content

Commit

Permalink
nfc: mrvl: simplify with module_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Kozlowski authored and Jakub Kicinski committed Jun 1, 2021
1 parent 8f99528 commit e3bf553
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/nfc/nfcmrvl/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit e3bf553

Please sign in to comment.