summaryrefslogtreecommitdiffstats
path: root/drivers/misc/bmp085-spi.c
diff options
context:
space:
mode:
authorDevendra Naga <develkernel412222@gmail.com>2012-08-23 14:23:09 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 14:10:29 -0700
commit9c8dc10f487dde5b114a53c73a36b3bc4459e213 (patch)
treeb1279e921a194ce5798f7b230e72dcd34ea4843a /drivers/misc/bmp085-spi.c
parent7e0b2cde502a7ea471ae7202ad88efdd7eaf3dbd (diff)
downloadlinux-9c8dc10f487dde5b114a53c73a36b3bc4459e213.tar.gz
linux-9c8dc10f487dde5b114a53c73a36b3bc4459e213.tar.bz2
linux-9c8dc10f487dde5b114a53c73a36b3bc4459e213.zip
misc: use module_spi_driver
The _init and _exit functions can be replaced with the module_spi_driver macro, which actually implements static int __init drv_init(void) { spi_register_driver(&driv_op); return 0; } module_init(drv_init); static void __exit drv_exit(void) { spi_unregister_driver(&driv_op); } module_exit(drv_exit); Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/bmp085-spi.c')
-rw-r--r--drivers/misc/bmp085-spi.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/misc/bmp085-spi.c b/drivers/misc/bmp085-spi.c
index 78aaff9b5231..5e982af99730 100644
--- a/drivers/misc/bmp085-spi.c
+++ b/drivers/misc/bmp085-spi.c
@@ -73,19 +73,8 @@ static struct spi_driver bmp085_spi_driver = {
.remove = __devexit_p(bmp085_spi_remove)
};
-static int __init bmp085_spi_init(void)
-{
- return spi_register_driver(&bmp085_spi_driver);
-}
-
-static void __exit bmp085_spi_exit(void)
-{
- spi_unregister_driver(&bmp085_spi_driver);
-}
+module_spi_driver(bmp085_spi_driver);
MODULE_AUTHOR("Eric Andersson <eric.andersson@unixphere.com>");
MODULE_DESCRIPTION("BMP085 SPI bus driver");
MODULE_LICENSE("GPL");
-
-module_init(bmp085_spi_init);
-module_exit(bmp085_spi_exit);