linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] TTY: amiserial, use module_platform_driver_probe()
@ 2013-03-05  3:29 Jingoo Han
  0 siblings, 0 replies; only message in thread
From: Jingoo Han @ 2013-03-05  3:29 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: 'Jiri Slaby', linux-serial, 'Jingoo Han'

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/tty/amiserial.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index fc70034..083710e 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1798,19 +1798,7 @@ static struct platform_driver amiga_serial_driver = {
 	},
 };
 
-static int __init amiga_serial_init(void)
-{
-	return platform_driver_probe(&amiga_serial_driver, amiga_serial_probe);
-}
-
-module_init(amiga_serial_init);
-
-static void __exit amiga_serial_exit(void)
-{
-	platform_driver_unregister(&amiga_serial_driver);
-}
-
-module_exit(amiga_serial_exit);
+module_platform_driver_probe(amiga_serial_driver, amiga_serial_probe);
 
 
 #if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)
-- 
1.7.2.5



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

only message in thread, other threads:[~2013-03-05  3:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05  3:29 [PATCH] TTY: amiserial, use module_platform_driver_probe() Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).