linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun@huaweicloud.com>
To: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH -next v2 5/5] misc: microchip: pci1xxxx: use module_auxiliary_driver
Date: Wed,  7 Sep 2022 14:58:08 +0000	[thread overview]
Message-ID: <20220907145808.1789249-5-weiyongjun@huaweicloud.com> (raw)
In-Reply-To: <20220907145808.1789249-1-weiyongjun@huaweicloud.com>

From: Wei Yongjun <weiyongjun1@huawei.com>

Use the module_auxiliary_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
index fa80a7788596..9cc771c604ed 100644
--- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
+++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c
@@ -421,19 +421,7 @@ static struct auxiliary_driver pci1xxxx_gpio_driver = {
 	.probe = pci1xxxx_gpio_probe,
 	.id_table = pci1xxxx_gpio_auxiliary_id_table
 };
-
-static int __init pci1xxxx_gpio_driver_init(void)
-{
-	return auxiliary_driver_register(&pci1xxxx_gpio_driver);
-}
-
-static void __exit pci1xxxx_gpio_driver_exit(void)
-{
-	auxiliary_driver_unregister(&pci1xxxx_gpio_driver);
-}
-
-module_init(pci1xxxx_gpio_driver_init);
-module_exit(pci1xxxx_gpio_driver_exit);
+module_auxiliary_driver(pci1xxxx_gpio_driver);
 
 MODULE_DESCRIPTION("Microchip Technology Inc. PCI1xxxx GPIO controller");
 MODULE_AUTHOR("Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>");
-- 
2.34.1


  parent reply	other threads:[~2022-09-07 14:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07 14:58 [PATCH -next v2 1/5] misc: microchip: pci1xxxx: fix error handling in gp_aux_bus_probe() Wei Yongjun
2022-09-07 14:58 ` [PATCH -next v2 2/5] misc: microchip: pci1xxxx: Fix missing spin_lock_init() Wei Yongjun
2022-09-08  5:59   ` Kumaravel.Thiagarajan
2022-09-07 14:58 ` [PATCH -next v2 3/5] misc: microchip: pci1xxxx: Make symbol 'pci1xxxx_gpio_auxiliary_id_table' static Wei Yongjun
2022-09-08  6:02   ` Kumaravel.Thiagarajan
2022-09-07 14:58 ` [PATCH -next v2 4/5] misc: microchip: pci1xxxx: Add missing MODULE_DEVICE_TABLE Wei Yongjun
2022-09-08  6:04   ` Kumaravel.Thiagarajan
2022-09-07 14:58 ` Wei Yongjun [this message]
2022-09-08  6:16   ` [PATCH -next v2 5/5] misc: microchip: pci1xxxx: use module_auxiliary_driver Kumaravel.Thiagarajan
2022-09-08  5:56 ` [PATCH -next v2 1/5] misc: microchip: pci1xxxx: fix error handling in gp_aux_bus_probe() Kumaravel.Thiagarajan

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=20220907145808.1789249-5-weiyongjun@huaweicloud.com \
    --to=weiyongjun@huaweicloud.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyongjun1@huawei.com \
    /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).