Skip to content

Commit

Permalink
net: ks8695net: Use module_platform_driver()
Browse files Browse the repository at this point in the history
module_platform_driver macro removes some boilerplate and
simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sachin Kamat authored and David S. Miller committed Mar 20, 2013
1 parent 2b5faa4 commit 18e4a73
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions drivers/net/ethernet/micrel/ks8695net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1622,25 +1622,7 @@ static struct platform_driver ks8695_driver = {
.resume = ks8695_drv_resume,
};

/* Module interface */

static int __init
ks8695_init(void)
{
printk(KERN_INFO "%s Ethernet driver, V%s\n",
MODULENAME, MODULEVERSION);

return platform_driver_register(&ks8695_driver);
}

static void __exit
ks8695_cleanup(void)
{
platform_driver_unregister(&ks8695_driver);
}

module_init(ks8695_init);
module_exit(ks8695_cleanup);
module_platform_driver(ks8695_driver);

MODULE_AUTHOR("Simtec Electronics");
MODULE_DESCRIPTION("Micrel KS8695 (Centaur) Ethernet driver");
Expand Down

0 comments on commit 18e4a73

Please sign in to comment.