From: Lars-Peter Clausen Date: Tue, 12 Mar 2013 12:13:52 +0000 (+0100) Subject: can: mcp251x: Use module_spi_driver X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01b88070753482fb1a94ab70e7ee348634055009;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index 05e93e86b55c..4dc7b9d48abd 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 , " "Christian Pellegrin ");