x86: smartconnect: use module_acpi_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 17 Jul 2013 01:52:28 +0000 (09:52 +0800)
committerMatthew Garrett <matthew.garrett@nebula.com>
Thu, 5 Sep 2013 12:51:39 +0000 (08:51 -0400)
module_acpi_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
drivers/platform/x86/intel-smartconnect.c

index f74e93d096bc6b4de29e5079a112f607f0257b00..52259dcabecb8251edad2a0e0dc7eccb9b174500 100644 (file)
@@ -74,17 +74,6 @@ static struct acpi_driver smartconnect_driver = {
        },
 };
 
-static int smartconnect_init(void)
-{
-       return acpi_bus_register_driver(&smartconnect_driver);
-}
-
-static void smartconnect_exit(void)
-{
-       acpi_bus_unregister_driver(&smartconnect_driver);
-}
-
-module_init(smartconnect_init);
-module_exit(smartconnect_exit);
+module_acpi_driver(smartconnect_driver);
 
 MODULE_DEVICE_TABLE(acpi, smartconnect_ids);