]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PNP: tty/serial/8250/8250_fintek: Use module_pnp_driver to register driver
authorPeter Huewe <PeterHuewe@gmx.de>
Mon, 16 Mar 2015 20:46:37 +0000 (21:46 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Mar 2015 21:39:18 +0000 (22:39 +0100)
Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/tty/serial/8250/8250_fintek.c

index 1e6899bc9429012e177de03b68435ded26c4c6a0..5815e81b5fc603cdad8463bcdd5cfe0880186376 100644 (file)
@@ -234,18 +234,7 @@ static struct pnp_driver fintek_8250_driver = {
        .id_table       = fintek_dev_table,
 };
 
-static int fintek_8250_init(void)
-{
-       return pnp_register_driver(&fintek_8250_driver);
-}
-module_init(fintek_8250_init);
-
-static void fintek_8250_exit(void)
-{
-       pnp_unregister_driver(&fintek_8250_driver);
-}
-module_exit(fintek_8250_exit);
-
+module_pnp_driver(fintek_8250_driver);
 MODULE_DESCRIPTION("Fintek F812164 module");
 MODULE_AUTHOR("Ricardo Ribalda <ricardo.ribalda@gmail.com>");
 MODULE_LICENSE("GPL");