diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-12 13:13:52 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2013-03-27 13:07:09 +0100 |
commit | 01b88070753482fb1a94ab70e7ee348634055009 (patch) | |
tree | 3da3881ff57f2659e66a61cd3b38399b4aefa692 /drivers/net/can | |
parent | 4c2e33f00cbfd8ccc9921e5655b768eb54327bb7 (diff) | |
download | linux-3.10-01b88070753482fb1a94ab70e7ee348634055009.tar.gz linux-3.10-01b88070753482fb1a94ab70e7ee348634055009.tar.bz2 linux-3.10-01b88070753482fb1a94ab70e7ee348634055009.zip |
can: mcp251x: 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: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/mcp251x.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index 05e93e86b55..4dc7b9d48ab 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c @@ -1216,19 +1216,7 @@ static struct spi_driver mcp251x_can_driver = { .suspend = mcp251x_can_suspend, .resume = mcp251x_can_resume, }; - -static int __init mcp251x_can_init(void) -{ - return spi_register_driver(&mcp251x_can_driver); -} - -static void __exit mcp251x_can_exit(void) -{ - spi_unregister_driver(&mcp251x_can_driver); -} - -module_init(mcp251x_can_init); -module_exit(mcp251x_can_exit); +module_spi_driver(mcp251x_can_driver); MODULE_AUTHOR("Chris Elston <celston@katalix.com>, " "Christian Pellegrin <chripell@evolware.org>"); |