[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1365327184-22956-1-git-send-email-lars@metafoo.de>
Date: Sun, 7 Apr 2013 11:33:03 +0200
From: Lars-Peter Clausen <lars@...afoo.de>
To: "David S. Miller" <davem@...emloft.net>
Cc: Ben Dooks <ben-linux@...ff.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>
Subject: [PATCH 1/2] 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@...afoo.de>
---
drivers/net/ethernet/micrel/ks8851.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index 8fb4812..84ca876 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@...tec.co.uk>");
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists