lkml.org 
[lkml]   [2017]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2 2/4] platform/x86: topstar-laptop: change to generic module
Signed-off-by: Guillaume Douézan-Grard <gdouezangrard@gmail.com>
---
drivers/platform/x86/topstar-laptop.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/topstar-laptop.c b/drivers/platform/x86/topstar-laptop.c
index 106537fdc4e6..714d9d56c79f 100644
--- a/drivers/platform/x86/topstar-laptop.c
+++ b/drivers/platform/x86/topstar-laptop.c
@@ -213,7 +213,25 @@ static struct acpi_driver topstar_acpi_driver = {
.notify = topstar_acpi_notify,
},
};
-module_acpi_driver(topstar_acpi_driver);
+
+static int __init topstar_laptop_init(void)
+{
+ int res;
+
+ res = acpi_bus_register_driver(&topstar_acpi_driver);
+ if (res < 0)
+ return res;
+
+ return 0;
+}
+
+static void __exit topstar_laptop_exit(void)
+{
+ acpi_bus_unregister_driver(&topstar_acpi_driver);
+}
+
+module_init(topstar_laptop_init);
+module_exit(topstar_laptop_exit);

MODULE_AUTHOR("Herton Ronaldo Krzesinski");
MODULE_AUTHOR("Guillaume Douézan-Grard");
--
2.14.3
\
 
 \ /
  Last update: 2017-10-29 00:52    [W:0.119 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site