[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b40361cf40e8a73310d48ac775f7b324c08c7f95.1519225570.git.gdouezangrard@gmail.com>
Date: Wed, 21 Feb 2018 16:12:54 +0100
From: Guillaume Douézan-Grard <gdouezangrard@...il.com>
To: Andy Shevchenko <andy@...radead.org>
Cc: Darren Hart <dvhart@...radead.org>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 1/6] revert "topstar-laptop: 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@...il.com>
---
drivers/platform/x86/topstar-laptop.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
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");
--
2.16.1
Powered by blists - more mailing lists