From patchwork Fri Apr 21 22:28:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9693867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73827601D4 for ; Fri, 21 Apr 2017 22:28:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6471728684 for ; Fri, 21 Apr 2017 22:28:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5829628688; Fri, 21 Apr 2017 22:28:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAB6328684 for ; Fri, 21 Apr 2017 22:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1042543AbdDUW2e (ORCPT ); Fri, 21 Apr 2017 18:28:34 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42920 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1042542AbdDUW2d (ORCPT ); Fri, 21 Apr 2017 18:28:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9D05D60FEC; Fri, 21 Apr 2017 22:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1492813712; bh=8m2CFi0/QIjKbXcwfNIiKVEBJdIdEg+GeoNQzR26PkE=; h=From:To:Cc:Subject:Date:From; b=EsVLlXjRSx4tVu5r4+wu1EAYZnGDwlLDP58ddoF5b6uAOpVZdr5wYA9SyadVNcbiO o5dJ2meHDhmIktfMBi9amQ4bsvZlSsh2Ai2sHE8Pa4jkb3MFtMlgbBIUyFxDENBUnG Hpy7/n33AGZjoF/b/pA5O9E1teLRZ7Cj9n8j/3+g= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7053C60FEC; Fri, 21 Apr 2017 22:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1492813712; bh=8m2CFi0/QIjKbXcwfNIiKVEBJdIdEg+GeoNQzR26PkE=; h=From:To:Cc:Subject:Date:From; b=EsVLlXjRSx4tVu5r4+wu1EAYZnGDwlLDP58ddoF5b6uAOpVZdr5wYA9SyadVNcbiO o5dJ2meHDhmIktfMBi9amQ4bsvZlSsh2Ai2sHE8Pa4jkb3MFtMlgbBIUyFxDENBUnG Hpy7/n33AGZjoF/b/pA5O9E1teLRZ7Cj9n8j/3+g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7053C60FEC Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-acpi@vger.kernel.org, timur@codeaurora.org Cc: Sinan Kaya , "Rafael J. Wysocki" , Len Brown , linux-kernel@vger.kernel.org Subject: [PATCH] ACPI / GED: use late init to allow other drivers init Date: Fri, 21 Apr 2017 18:28:24 -0400 Message-Id: <1492813704-32280-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Tyler Baicar --- 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);