summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/topstar-laptop.c
diff options
context:
space:
mode:
authorGuillaume Douézan-Grard <gdouezangrard@gmail.com>2018-02-21 18:00:06 +0100
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-02-23 17:43:40 +0100
commit82acad40ca97f309ff066864ae63cbe68812f983 (patch)
tree0e06a32fa2fb3f6b87c5f02d8427cbe0ed64bebb /drivers/platform/x86/topstar-laptop.c
parentplatform/x86: wmi: Replace list_for_each() by list_for_each_entry() (diff)
downloadlinux-82acad40ca97f309ff066864ae63cbe68812f983.tar.xz
linux-82acad40ca97f309ff066864ae63cbe68812f983.zip
platform/x86: topstar-laptop: revert "convert to module_acpi_driver()"
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>
Diffstat (limited to 'drivers/platform/x86/topstar-laptop.c')
-rw-r--r--drivers/platform/x86/topstar-laptop.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index 1032c00b907b..b4807b868a69 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -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");