Skip to content

Commit

Permalink
staging/phison: use module_pci_driver macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Jul 12, 2012
1 parent 1cdb9c7 commit d44858a
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/staging/phison/phison.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,7 @@ static struct pci_driver phison_pci_driver = {
#endif
};

static int __init phison_ide_init(void)
{
return pci_register_driver(&phison_pci_driver);
}

static void __exit phison_ide_exit(void)
{
pci_unregister_driver(&phison_pci_driver);
}

module_init(phison_ide_init);
module_exit(phison_ide_exit);
module_pci_driver(phison_pci_driver);

MODULE_AUTHOR("Evan Ko");
MODULE_DESCRIPTION("PCIE driver module for PHISON PS5000 E-BOX");
Expand Down

0 comments on commit d44858a

Please sign in to comment.