Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1168740AbdDYHCF (ORCPT ); Tue, 25 Apr 2017 03:02:05 -0400 Received: from mailout3.hostsharing.net ([176.9.242.54]:55805 "EHLO mailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1167833AbdDYHB4 (ORCPT ); Tue, 25 Apr 2017 03:01:56 -0400 Date: Tue, 25 Apr 2017 09:01:54 +0200 From: Lukas Wunner To: Sinan Kaya Cc: ACPI Devel Maling List , Timur Tabi , "Rafael J. Wysocki" , Len Brown , Linux Kernel Mailing List Subject: Re: [PATCH] ACPI / GED: use late init to allow other drivers init Message-ID: <20170425070154.GC9999@wunner.de> References: <1492813704-32280-1-git-send-email-okaya@codeaurora.org> <3f0f2853-d2e5-be32-2bde-47e72c51a0a6@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f0f2853-d2e5-be32-2bde-47e72c51a0a6@codeaurora.org> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 24 On Sat, Apr 22, 2017 at 12:48 AM, Sinan Kaya wrote: > On 4/21/2017 6:43 PM, Rafael J. Wysocki wrote: > > +late_initcall(ged_init); > > Does this fix the problem? > > > > What about if the module in question is loaded after running > > late_initcalls? > > This fixed the issue for me where I had dependencies for QUP I2C driver > and GHES drivers. Both of them are modules and get probed via normal > module execution path. > > However, I'm open to improvements. Do you have a better suggestion? > I can try to add some _DEP stuff if it is present, but I remember Linux > doesn't like _DEP stuff too much. Would it be possible to solve this by just returning -EPROBE_DEFER from the ->probe hook if the devices you depend on are not bound yet? Alternatively, would it be possible to solve it with a struct device_link? Thanks, Lukas