diff mbox

[2/4] PCI / DPC: Convert to use module_pcie_port_service()

Message ID 1465218368-36494-3-git-send-email-mika.westerberg@linux.intel.com
State Not Applicable
Headers show

Commit Message

Mika Westerberg June 6, 2016, 1:06 p.m. UTC
There is no need to open-code this in the driver. Use the helper we just
introduced to remove the boilerblate code from the driver.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/pci/pcie/pcie-dpc.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
diff mbox

Patch

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index ab552f1bc08f..533c548607d7 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -144,20 +144,9 @@  static struct pcie_port_service_driver dpcdriver = {
 	.remove		= dpc_remove,
 };
 
-static int __init dpc_service_init(void)
-{
-	return pcie_port_service_register(&dpcdriver);
-}
-
-static void __exit dpc_service_exit(void)
-{
-	pcie_port_service_unregister(&dpcdriver);
-}
+module_pcie_port_service(dpcdriver);
 
 MODULE_DESCRIPTION("PCI Express Downstream Port Containment driver");
 MODULE_AUTHOR("Keith Busch <keith.busch@intel.com>");
 MODULE_LICENSE("GPL");
 MODULE_VERSION("0.1");
-
-module_init(dpc_service_init);
-module_exit(dpc_service_exit);