From: alex.bluesman.smirnov@gmail.com Date: Sun, 26 Aug 2012 05:10:10 +0000 (+0000) Subject: drivers/ieee802154/at86rf230: replace the code under _init and _exit by macro X-Git-Tag: v3.7-rc1~145^2~265 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=395a57385508f7b8b445b6911bfa35bc0ccaa0ff;p=platform%2Fkernel%2Flinux-3.10.git drivers/ieee802154/at86rf230: replace the code under _init and _exit by macro The code under _init and _exit functions is similar to the code of module_spi_driver macro, which is a wrapper to the module_driver macro, so use it instead. Signed-off-by: Alexander Smirnov Cc: Devendra Naga Signed-off-by: David S. Miller --- diff --git a/drivers/ieee802154/at86rf230.c b/drivers/ieee802154/at86rf230.c index 5d30940..ba753d8 100644 --- a/drivers/ieee802154/at86rf230.c +++ b/drivers/ieee802154/at86rf230.c @@ -952,17 +952,7 @@ static struct spi_driver at86rf230_driver = { .resume = at86rf230_resume, }; -static int __init at86rf230_init(void) -{ - return spi_register_driver(&at86rf230_driver); -} -module_init(at86rf230_init); - -static void __exit at86rf230_exit(void) -{ - spi_unregister_driver(&at86rf230_driver); -} -module_exit(at86rf230_exit); +module_spi_driver(at86rf230_driver); MODULE_DESCRIPTION("AT86RF230 Transceiver Driver"); MODULE_LICENSE("GPL v2");