linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	"David S. Miller" <davem@davemloft.net>,
	Randy Dunlap <rdunlap@infradead.org>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-nfc@lists.01.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 05/11] nfc: mrvl: simplify with module_driver
Date: Fri, 28 May 2021 10:55:28 -0400	[thread overview]
Message-ID: <20210528145534.125460-2-krzysztof.kozlowski@canonical.com> (raw)
In-Reply-To: <20210528145534.125460-1-krzysztof.kozlowski@canonical.com>

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>
---
 drivers/nfc/nfcmrvl/uart.c | 18 +-----------------
 1 file changed, 1 insertion(+), 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");
-- 
2.27.0


  reply	other threads:[~2021-05-28 14:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 14:53 [PATCH 01/11] nfc: fdp: drop ftrace-like debugging messages Krzysztof Kozlowski
2021-05-28 14:53 ` [PATCH 02/11] nfc: mei_phy: " Krzysztof Kozlowski
2021-05-28 14:53 ` [PATCH 03/11] nfc: mrvl: use SPDX-License-Identifier Krzysztof Kozlowski
2021-05-28 14:55 ` [PATCH 04/11] nfc: mrvl: correct minor coding style violations Krzysztof Kozlowski
2021-05-28 14:55   ` Krzysztof Kozlowski [this message]
2021-05-28 14:55   ` [PATCH 06/11] nfc: pn533: drop ftrace-like debugging messages Krzysztof Kozlowski
2021-05-28 14:55   ` [PATCH 07/11] nfc: pn533: drop unneeded braces {} in if Krzysztof Kozlowski
2021-05-28 14:55   ` [PATCH 08/11] nfc: pn544: drop ftrace-like debugging messages Krzysztof Kozlowski
2021-05-28 14:55   ` [PATCH 09/11] nfc: st21nfca: " Krzysztof Kozlowski
2021-05-28 14:55   ` [PATCH 10/11] nfc: st-nci: " Krzysztof Kozlowski
2021-05-28 14:56 ` [PATCH 11/11] nfc: st95hf: fix indentation to tabs Krzysztof Kozlowski
2021-05-28 22:13 ` [PATCH 01/11] nfc: fdp: drop ftrace-like debugging messages Jakub Kicinski
2021-05-31  7:30   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210528145534.125460-2-krzysztof.kozlowski@canonical.com \
    --to=krzysztof.kozlowski@canonical.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfc@lists.01.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).