提交 01b88070 编写于 作者: L Lars-Peter Clausen 提交者: Marc Kleine-Budde

can: mcp251x: Use module_spi_driver

By using module_spi_driver we can eliminate a few lines of boilerplate code.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 4c2e33f0
......@@ -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>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册