[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369079776-6214-1-git-send-email-peterhuewe@gmx.de>
Date: Mon, 20 May 2013 21:56:16 +0200
From: Peter Huewe <peterhuewe@....de>
To: "David S. Miller" <davem@...emloft.net>
Cc: Bill Pemberton <wfp5p@...ginia.edu>,
Peter Huewe <peterhuewe@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] net/ethernet/micrel/ks8851.c: Use module_spi_driver to register driver
Removing some boilerplate by using module_spi_driver instead of calling
register and unregister in the otherwise empty init/exit functions
Signed-off-by: Peter Huewe <peterhuewe@....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 33bcb63..ca91e7c 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1539,19 +1539,7 @@ static struct spi_driver ks8851_driver = {
.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>");
MODULE_LICENSE("GPL");
--
1.8.1.5
--
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