summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/micrel/ks8851.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-04-07 03:33:03 +0400
committerDavid S. Miller <davem@davemloft.net>2013-04-09 00:52:21 +0400
commit0582ce92a09e826c1ac62d7e8dbc2dd72f6f99c3 (patch)
treeb10074c25b8957d30b038da6cfa7519ba8b138ac /drivers/net/ethernet/micrel/ks8851.c
parent9f7f78b479ae06279a85451d456040bbe4eae013 (diff)
downloadlinux-0582ce92a09e826c1ac62d7e8dbc2dd72f6f99c3.tar.xz
net: ks8851: Use module_spi_driver
By using module_spi_driver we can eliminate a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel/ks8851.c')
-rw-r--r--drivers/net/ethernet/micrel/ks8851.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 4a3b4995f19a..3fd65c8a929e 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1538,19 +1538,7 @@ static struct spi_driver ks8851_driver = {
.suspend = ks8851_suspend,
.resume = ks8851_resume,
};
-
-static int __init ks8851_init(void)
-{
- return spi_register_driver(&ks8851_driver);
-}
-
-static void __exit ks8851_exit(void)
-{
- spi_unregister_driver(&ks8851_driver);
-}
-
-module_init(ks8851_init);
-module_exit(ks8851_exit);
+module_spi_driver(ks8851_driver);
MODULE_DESCRIPTION("KS8851 Network driver");
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");