linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro
@ 2021-07-21  8:20 Andy Shevchenko
  2021-07-21  8:42 ` Loic Poulain
  2021-07-21 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2021-07-21  8:20 UTC (permalink / raw)
  To: M Chetan Kumar, Andy Shevchenko, netdev, linux-kernel
  Cc: Intel Corporation, Loic Poulain, Sergey Ryazanov, Johannes Berg,
	David S. Miller, Jakub Kicinski

Eliminate some boilerplate code by using module_pci_driver() instead of
init/exit, moving the salient bits from init into probe.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/wwan/iosm/iosm_ipc_pcie.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
index 7f7d364d3a51..2fe88b8be348 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
@@ -479,6 +479,7 @@ static struct pci_driver iosm_ipc_driver = {
 	},
 	.id_table = iosm_ipc_ids,
 };
+module_pci_driver(iosm_ipc_driver);
 
 int ipc_pcie_addr_map(struct iosm_pcie *ipc_pcie, unsigned char *data,
 		      size_t size, dma_addr_t *mapping, int direction)
@@ -560,21 +561,3 @@ void ipc_pcie_kfree_skb(struct iosm_pcie *ipc_pcie, struct sk_buff *skb)
 	IPC_CB(skb)->mapping = 0;
 	dev_kfree_skb(skb);
 }
-
-static int __init iosm_ipc_driver_init(void)
-{
-	if (pci_register_driver(&iosm_ipc_driver)) {
-		pr_err("registering of IOSM PCIe driver failed");
-		return -1;
-	}
-
-	return 0;
-}
-
-static void __exit iosm_ipc_driver_exit(void)
-{
-	pci_unregister_driver(&iosm_ipc_driver);
-}
-
-module_init(iosm_ipc_driver_init);
-module_exit(iosm_ipc_driver_exit);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro
  2021-07-21  8:20 [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro Andy Shevchenko
@ 2021-07-21  8:42 ` Loic Poulain
  2021-07-21 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Loic Poulain @ 2021-07-21  8:42 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: M Chetan Kumar, Network Development, open list,
	Intel Corporation, Sergey Ryazanov, Johannes Berg,
	David S. Miller, Jakub Kicinski

On Wed, 21 Jul 2021 at 10:20, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Eliminate some boilerplate code by using module_pci_driver() instead of
> init/exit, moving the salient bits from init into probe.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Loic Poulain <loic.poulain@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro
  2021-07-21  8:20 [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro Andy Shevchenko
  2021-07-21  8:42 ` Loic Poulain
@ 2021-07-21 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-21 16:10 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: m.chetan.kumar, netdev, linux-kernel, linuxwwan, loic.poulain,
	ryazanov.s.a, johannes, davem, kuba

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 21 Jul 2021 11:20:58 +0300 you wrote:
> Eliminate some boilerplate code by using module_pci_driver() instead of
> init/exit, moving the salient bits from init into probe.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/net/wwan/iosm/iosm_ipc_pcie.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)

Here is the summary with links:
  - [v1,1/1] net: wwan: iosm: Switch to use module_pci_driver() macro
    https://git.kernel.org/netdev/net-next/c/7f8b20d0deed

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-21 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  8:20 [PATCH v1 1/1] net: wwan: iosm: Switch to use module_pci_driver() macro Andy Shevchenko
2021-07-21  8:42 ` Loic Poulain
2021-07-21 16:10 ` patchwork-bot+netdevbpf

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).