From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936758AbdJQQSI (ORCPT ); Tue, 17 Oct 2017 12:18:08 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:48349 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934240AbdJQQSG (ORCPT ); Tue, 17 Oct 2017 12:18:06 -0400 X-Google-Smtp-Source: ABhQp+RvMsShcwvnI8Zc7MBI3iQWmEfoW871r9S0amlHzc5fGqQdieYxMfRtNCutHsSbOlO4N3kmnQ== Date: Tue, 17 Oct 2017 18:18:03 +0200 From: Guillaume =?utf-8?Q?Dou=C3=A9zan-Grard?= To: Darren Hart Cc: Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] platform/x86: topstar-laptop: change to generic module Message-ID: <182e90217e61a03b17237b4c1aa633813fcde6e5.1508255487.git.gdouezangrard@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Guillaume Douézan-Grard --- 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 d3197302aa91..ce33754c1f29 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, Guillaume Douézan-Grard"); MODULE_DESCRIPTION("Topstar Laptop ACPI Extras"); -- 2.14.1