diff mbox

spi: spi-tle62x0: Use module_spi_driver macro

Message ID 1346758115-13150-1-git-send-email-sachin.kamat@linaro.org (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sachin Kamat Sept. 4, 2012, 11:28 a.m. UTC
module_spi_driver eliminates module_init and module_exit
calls and makes the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/spi/spi-tle62x0.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

Comments

Mark Brown Sept. 5, 2012, 11:44 p.m. UTC | #1
On Tue, Sep 04, 2012 at 04:58:35PM +0530, Sachin Kamat wrote:
> module_spi_driver eliminates module_init and module_exit
> calls and makes the code simpler.

Applied, thanks.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
diff mbox

Patch

diff --git a/drivers/spi/spi-tle62x0.c b/drivers/spi/spi-tle62x0.c
index 0ce5c12..2442102 100644
--- a/drivers/spi/spi-tle62x0.c
+++ b/drivers/spi/spi-tle62x0.c
@@ -316,18 +316,7 @@  static struct spi_driver tle62x0_driver = {
 	.remove		= __devexit_p(tle62x0_remove),
 };
 
-static __init int tle62x0_init(void)
-{
-	return spi_register_driver(&tle62x0_driver);
-}
-
-static __exit void tle62x0_exit(void)
-{
-	spi_unregister_driver(&tle62x0_driver);
-}
-
-module_init(tle62x0_init);
-module_exit(tle62x0_exit);
+module_spi_driver(tle62x0_driver);
 
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("TLE62x0 SPI driver");