tty: max3100: use module_spi_driver
the driver's module init and exit functions can be replaced with module_spi_driver as they do only spi_register_driver and spi_unregister_driver in module's init and exit paths. Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1c4c4394a6
commit
c0fc208e48
@@ -910,17 +910,7 @@ static struct spi_driver max3100_driver = {
|
|||||||
.resume = max3100_resume,
|
.resume = max3100_resume,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init max3100_init(void)
|
module_spi_driver(max3100_driver);
|
||||||
{
|
|
||||||
return spi_register_driver(&max3100_driver);
|
|
||||||
}
|
|
||||||
module_init(max3100_init);
|
|
||||||
|
|
||||||
static void __exit max3100_exit(void)
|
|
||||||
{
|
|
||||||
spi_unregister_driver(&max3100_driver);
|
|
||||||
}
|
|
||||||
module_exit(max3100_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("MAX3100 driver");
|
MODULE_DESCRIPTION("MAX3100 driver");
|
||||||
MODULE_AUTHOR("Christian Pellegrin <chripell@evolware.org>");
|
MODULE_AUTHOR("Christian Pellegrin <chripell@evolware.org>");
|
||||||
|
|||||||
Reference in New Issue
Block a user