Skip to content

Commit

Permalink
net: mdio-gpio: 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Sachin Kamat authored and davem330 committed Mar 20, 2013
1 parent 95d158d commit f8e5fc8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/net/phy/mdio-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,7 @@ static struct platform_driver mdio_gpio_driver = {
},
};

static int __init mdio_gpio_init(void)
{
return platform_driver_register(&mdio_gpio_driver);
}
module_init(mdio_gpio_init);

static void __exit mdio_gpio_exit(void)
{
platform_driver_unregister(&mdio_gpio_driver);
}
module_exit(mdio_gpio_exit);
module_platform_driver(mdio_gpio_driver);

MODULE_ALIAS("platform:mdio-gpio");
MODULE_AUTHOR("Laurent Pinchart, Paulius Zaleckas");
Expand Down

0 comments on commit f8e5fc8

Please sign in to comment.