mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
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>
This commit is contained in:
parent
7e0b2cde50
commit
9c8dc10f48
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user