platform/x86: topstar-laptop: revert "convert to module_acpi_driver()"
authorGuillaume Douézan-Grard <gdouezangrard@gmail.com>
Wed, 21 Feb 2018 17:00:06 +0000 (18:00 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 23 Feb 2018 16:43:40 +0000 (18:43 +0200)
Revert commit
  15165594da65 ("topstar-laptop: convert to module_acpi_driver()")
to later add a platform device.

Signed-off-by: Guillaume Douézan-Grard <gdouezangrard@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/topstar-laptop.c

index 1032c00b907b99d2ae0f70a6f0ebab76698a98d1..b4807b868a6997f359d691d4588cad1f203938bd 100644 (file)
@@ -178,7 +178,27 @@ static struct acpi_driver acpi_topstar_driver = {
                .notify = acpi_topstar_notify,
        },
 };
-module_acpi_driver(acpi_topstar_driver);
+
+static int __init topstar_laptop_init(void)
+{
+       int ret;
+
+       ret = acpi_bus_register_driver(&acpi_topstar_driver);
+       if (ret < 0)
+               return ret;
+
+       pr_info("ACPI extras driver loaded\n");
+
+       return 0;
+}
+
+static void __exit topstar_laptop_exit(void)
+{
+       acpi_bus_unregister_driver(&acpi_topstar_driver);
+}
+
+module_init(topstar_laptop_init);
+module_exit(topstar_laptop_exit);
 
 MODULE_AUTHOR("Herton Ronaldo Krzesinski");
 MODULE_DESCRIPTION("Topstar Laptop ACPI Extras driver");