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@xxxxxxxxxxxxxxx> --- drivers/pci/pcie/pcie-dpc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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@xxxxxxxxx>"); MODULE_LICENSE("GPL"); MODULE_VERSION("0.1"); - -module_init(dpc_service_init); -module_exit(dpc_service_exit); -- 2.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html