Commit 7f8b20d0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

net: wwan: iosm: Switch to use module_pci_driver() macro

Eliminate some boilerplate code by using module_pci_driver() instead of
init/exit, moving the salient bits from init into probe.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarLoic Poulain <loic.poulain@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dcb713d5
...@@ -479,6 +479,7 @@ static struct pci_driver iosm_ipc_driver = { ...@@ -479,6 +479,7 @@ static struct pci_driver iosm_ipc_driver = {
}, },
.id_table = iosm_ipc_ids, .id_table = iosm_ipc_ids,
}; };
module_pci_driver(iosm_ipc_driver);
int ipc_pcie_addr_map(struct iosm_pcie *ipc_pcie, unsigned char *data, int ipc_pcie_addr_map(struct iosm_pcie *ipc_pcie, unsigned char *data,
size_t size, dma_addr_t *mapping, int direction) 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) ...@@ -560,21 +561,3 @@ void ipc_pcie_kfree_skb(struct iosm_pcie *ipc_pcie, struct sk_buff *skb)
IPC_CB(skb)->mapping = 0; IPC_CB(skb)->mapping = 0;
dev_kfree_skb(skb); 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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment