Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging/phison: use module_pci_driver macro

remove the duplication of module_pci_driver and use this macro instead

module_pci_driver macro does the same things as the code below does

static int __init pci_test_dev_init(void)
{
return pci_register_driver(&pci_test_driver_ops);
}

static void __exit pci_test_dev_exit(void)
{
pci_unregister_driver(&pci_test_driver_ops);
}

module_init(pci_test_dev_init);
module_exit(pci_test_dev_exit);

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Devendra Naga and committed by
Greg Kroah-Hartman
d44858a9 1cdb9c7c

+1 -12
+1 -12
drivers/staging/phison/phison.c
··· 87 87 #endif 88 88 }; 89 89 90 - static int __init phison_ide_init(void) 91 - { 92 - return pci_register_driver(&phison_pci_driver); 93 - } 94 - 95 - static void __exit phison_ide_exit(void) 96 - { 97 - pci_unregister_driver(&phison_pci_driver); 98 - } 99 - 100 - module_init(phison_ide_init); 101 - module_exit(phison_ide_exit); 90 + module_pci_driver(phison_pci_driver); 102 91 103 92 MODULE_AUTHOR("Evan Ko"); 104 93 MODULE_DESCRIPTION("PCIE driver module for PHISON PS5000 E-BOX");