diff mbox series

[v1,1/1] net: wwan: iosm: Switch to use module_pci_driver() macro

Message ID 20210721082058.71098-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 7f8b20d0deed64629049b634e323e39d9f1a4fe3
Delegated to: Netdev Maintainers
Headers show
Series [v1,1/1] net: wwan: iosm: Switch to use module_pci_driver() macro | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit fail Errors and warnings before: 7 this patch: 7
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_allmodconfig_warn fail Errors and warnings before: 7 this patch: 7
netdev/header_inline success Link

Commit Message

Andy Shevchenko July 21, 2021, 8:20 a.m. UTC
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(-)

Comments

Loic Poulain July 21, 2021, 8:42 a.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org July 21, 2021, 4:10 p.m. UTC | #2
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
diff mbox series

Patch

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