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 <peterhu...@gmx.de> --- drivers/net/can/mcp251x.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c index f32b9fc..7a42e0f 100644 --- a/drivers/net/can/mcp251x.c +++ b/drivers/net/can/mcp251x.c @@ -1218,19 +1218,7 @@ static struct spi_driver mcp251x_can_driver = { .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 <cels...@katalix.com>, " "Christian Pellegrin <chrip...@evolware.org>"); MODULE_DESCRIPTION("Microchip 251x CAN driver"); -- 1.8.1.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/