Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] tty: use module_spi_driver
@ 2012-08-23 22:04 Devendra Naga
  0 siblings, 0 replies; only message in thread
From: Devendra Naga @ 2012-08-23 22:04 UTC (permalink / raw)
  To: linux-serial; +Cc: Alan Cox, Greg Kroah-Hartman, Devendra Naga

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>
---
 drivers/tty/serial/max3100.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index b4902b9..46043c2 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -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>");
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-23 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 22:04 [PATCH] tty: use module_spi_driver Devendra Naga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox