Skip to content

Commit

Permalink
net: dsa: qca8k: use mdio_module_driver to simplify the code
Browse files Browse the repository at this point in the history
mdio_module_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed Sep 22, 2016
1 parent fcfbfd6 commit a084ab3
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/net/dsa/qca8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,19 +1032,7 @@ static struct mdio_driver qca8kmdio_driver = {
},
};

static int __init
qca8kmdio_driver_register(void)
{
return mdio_driver_register(&qca8kmdio_driver);
}
module_init(qca8kmdio_driver_register);

static void __exit
qca8kmdio_driver_unregister(void)
{
mdio_driver_unregister(&qca8kmdio_driver);
}
module_exit(qca8kmdio_driver_unregister);
mdio_module_driver(qca8kmdio_driver);

MODULE_AUTHOR("Mathieu Olivari, John Crispin <[email protected]>");
MODULE_DESCRIPTION("Driver for QCA8K ethernet switch family");
Expand Down

0 comments on commit a084ab3

Please sign in to comment.