hp_accel: convert to module_acpi_driver()
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 7 Sep 2012 07:31:45 +0000 (10:31 +0300)
committerLen Brown <len.brown@intel.com>
Fri, 21 Sep 2012 17:40:45 +0000 (13:40 -0400)
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/hp_accel.c

index 6b9af98..18d74f2 100644 (file)
@@ -382,31 +382,8 @@ static struct acpi_driver lis3lv02d_driver = {
        },
        .drv.pm = HP_ACCEL_PM,
 };
-
-static int __init lis3lv02d_init_module(void)
-{
-       int ret;
-
-       if (acpi_disabled)
-               return -ENODEV;
-
-       ret = acpi_bus_register_driver(&lis3lv02d_driver);
-       if (ret < 0)
-               return ret;
-
-       pr_info("driver loaded\n");
-
-       return 0;
-}
-
-static void __exit lis3lv02d_exit_module(void)
-{
-       acpi_bus_unregister_driver(&lis3lv02d_driver);
-}
+module_acpi_driver(lis3lv02d_driver);
 
 MODULE_DESCRIPTION("Glue between LIS3LV02Dx and HP ACPI BIOS and support for disk protection LED.");
 MODULE_AUTHOR("Yan Burman, Eric Piel, Pavel Machek");
 MODULE_LICENSE("GPL");
-
-module_init(lis3lv02d_init_module);
-module_exit(lis3lv02d_exit_module);