Skip to content

Commit

Permalink
PNP: platform/x86/apple-gmux: 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 ed03538 commit 99f74f1
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/platform/x86/apple-gmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,19 +624,7 @@ static struct pnp_driver gmux_pnp_driver = {
},
};

static int __init apple_gmux_init(void)
{
return pnp_register_driver(&gmux_pnp_driver);
}

static void __exit apple_gmux_exit(void)
{
pnp_unregister_driver(&gmux_pnp_driver);
}

module_init(apple_gmux_init);
module_exit(apple_gmux_exit);

module_pnp_driver(gmux_pnp_driver);
MODULE_AUTHOR("Seth Forshee <seth.forshee@canonical.com>");
MODULE_DESCRIPTION("Apple Gmux Driver");
MODULE_LICENSE("GPL");
Expand Down

0 comments on commit 99f74f1

Please sign in to comment.