Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426458AbdDUWnG (ORCPT ); Fri, 21 Apr 2017 18:43:06 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:35765 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426412AbdDUWnC (ORCPT ); Fri, 21 Apr 2017 18:43:02 -0400 MIME-Version: 1.0 In-Reply-To: <1492813704-32280-1-git-send-email-okaya@codeaurora.org> References: <1492813704-32280-1-git-send-email-okaya@codeaurora.org> From: "Rafael J. Wysocki" Date: Sat, 22 Apr 2017 00:43:00 +0200 X-Google-Sender-Auth: ziA9h_JQQXoRecX2Fzc27X2WV9A Message-ID: Subject: Re: [PATCH] ACPI / GED: use late init to allow other drivers init To: Sinan Kaya Cc: ACPI Devel Maling List , Timur Tabi , "Rafael J. Wysocki" , Len Brown , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1174 Lines: 35 On Sat, Apr 22, 2017 at 12:28 AM, Sinan Kaya wrote: > GED driver is currently set up as a platform driver. On modern operating > systems, most of the drivers are compiled as kernel modules. It is possible > that a GED interrupt event is received and the driver such as GHES/GPIO/I2C > to service it is not available yet. To accommodate this use case, delay > GED driver load to the late init phase. > > Signed-off-by: Sinan Kaya > --- > drivers/acpi/evged.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c > index 46f0603..30e638b 100644 > --- a/drivers/acpi/evged.c > +++ b/drivers/acpi/evged.c > @@ -151,4 +151,10 @@ static int ged_probe(struct platform_device *pdev) > .acpi_match_table = ACPI_PTR(ged_acpi_ids), > }, > }; > -builtin_platform_driver(ged_driver); > + > +static __init int ged_init(void) > +{ > + return platform_driver_register(&ged_driver); > +} > + > +late_initcall(ged_init); Does this fix the problem? What about if the module in question is loaded after running late_initcalls? Thanks, Rafael