PNP: ide/ide-pnp: Use module_pnp_driver to register driver
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>
This commit is contained in:
parent
99c876bec3
commit
6a5333092e
1 changed files with 1 additions and 13 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue