Skip to content

Commit

Permalink
PNP: ata/pata_isapnp: 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 1551660 commit 99c876b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/ata/pata_isapnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,8 @@ static struct pnp_driver isapnp_driver = {
.remove = isapnp_remove_one,
};

static int __init isapnp_init(void)
{
return pnp_register_driver(&isapnp_driver);
}

static void __exit isapnp_exit(void)
{
pnp_unregister_driver(&isapnp_driver);
}

module_pnp_driver(isapnp_driver);
MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("low-level driver for ISA PnP ATA");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);

module_init(isapnp_init);
module_exit(isapnp_exit);

0 comments on commit 99c876b

Please sign in to comment.