From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792AbdJ1Wvu (ORCPT ); Sat, 28 Oct 2017 18:51:50 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:55694 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751314AbdJ1Wvr (ORCPT ); Sat, 28 Oct 2017 18:51:47 -0400 X-Google-Smtp-Source: ABhQp+QfGFpNHjlCZtV1Pk74GC4J6PWjUonHap5SNRbHsDTk6pb2d/QI5hXzkKIO9a2Zq2K+JKT5VQ== Date: Sun, 29 Oct 2017 00:51:44 +0200 From: Guillaume =?utf-8?Q?Dou=C3=A9zan-Grard?= To: Andy Shevchenko Cc: Darren Hart , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] platform/x86: topstar-laptop: change to generic module Message-ID: <1e1492d958ec60dcd3b61d3269f0aa72cc9cc93e.1509229280.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 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