From: Liu Shixin Date: Fri, 18 Sep 2020 03:08:29 +0000 (+0800) Subject: PCI: iproc: Use module_bcma_driver to simplify the code X-Git-Tag: v5.10-rc1~58^2~11^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c3c87d2b270a179f1149df5b84a7f7ad3474bdb;p=thirdparty%2Flinux.git PCI: iproc: Use module_bcma_driver to simplify the code module_bcma_driver() makes the code simpler by eliminating boilerplate code. Link: https://lore.kernel.org/r/20200918030829.3946025-1-liushixin2@huawei.com Signed-off-by: Liu Shixin Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Ray Jui --- diff --git a/drivers/pci/controller/pcie-iproc-bcma.c b/drivers/pci/controller/pcie-iproc-bcma.c index aa55b064f64db..56b8ee7bf3307 100644 --- a/drivers/pci/controller/pcie-iproc-bcma.c +++ b/drivers/pci/controller/pcie-iproc-bcma.c @@ -94,18 +94,7 @@ static struct bcma_driver iproc_pcie_bcma_driver = { .probe = iproc_pcie_bcma_probe, .remove = iproc_pcie_bcma_remove, }; - -static int __init iproc_pcie_bcma_init(void) -{ - return bcma_driver_register(&iproc_pcie_bcma_driver); -} -module_init(iproc_pcie_bcma_init); - -static void __exit iproc_pcie_bcma_exit(void) -{ - bcma_driver_unregister(&iproc_pcie_bcma_driver); -} -module_exit(iproc_pcie_bcma_exit); +module_bcma_driver(iproc_pcie_bcma_driver); MODULE_AUTHOR("Hauke Mehrtens"); MODULE_DESCRIPTION("Broadcom iProc PCIe BCMA driver");