Skip to content

Commit

Permalink
tty: max3100: use module_spi_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Sep 5, 2012
1 parent 1c4c439 commit c0fc208
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/tty/serial/max3100.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,17 +910,7 @@ static struct spi_driver max3100_driver = {
.resume = max3100_resume,
};

static int __init max3100_init(void)
{
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_spi_driver(max3100_driver);

MODULE_DESCRIPTION("MAX3100 driver");
MODULE_AUTHOR("Christian Pellegrin <chripell@evolware.org>");
Expand Down

0 comments on commit c0fc208

Please sign in to comment.