Skip to content

Commit

Permalink
PNP: ide/ide-pnp: Use module_pnp_driver to register driver
Browse files Browse the repository at this point in the history
Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Peter Huewe authored and Rafael J. Wysocki committed Mar 18, 2015
1 parent 99c876b commit 6a53330
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/ide/ide-pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,5 @@ static struct pnp_driver idepnp_driver = {
.remove = idepnp_remove,
};

static int __init pnpide_init(void)
{
return pnp_register_driver(&idepnp_driver);
}

static void __exit pnpide_exit(void)
{
pnp_unregister_driver(&idepnp_driver);
}

module_init(pnpide_init);
module_exit(pnpide_exit);

module_pnp_driver(idepnp_driver);
MODULE_LICENSE("GPL");

0 comments on commit 6a53330

Please sign in to comment.