[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4inpcwh5rH2bJSSqXuWCNxFAzLrbWLy-_yDAuzDenYURg@mail.gmail.com>
Date: Tue, 9 Feb 2021 12:01:06 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Dave Jiang <dave.jiang@...el.com>,
Jacob Pan <jacob.jun.pan@...el.com>,
Dave Ertman <david.m.ertman@...el.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver core: auxiliary bus: Fix calling stage for
auxiliary bus init
On Tue, Feb 9, 2021 at 11:16 AM Greg KH <gregkh@...uxfoundation.org> wrote:
[..]
> > diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
> > index 8336535f1e11..53f93a506626 100644
> > --- a/drivers/base/auxiliary.c
> > +++ b/drivers/base/auxiliary.c
> > @@ -270,7 +270,7 @@ static void __exit auxiliary_bus_exit(void)
> > bus_unregister(&auxiliary_bus_type);
> > }
> >
> > -module_init(auxiliary_bus_init);
> > +subsys_initcall(auxiliary_bus_init);
>
> Ah, the linker priority dance. Are you _SURE_ this will solve this?
All users are module_init() today so it will work.... today. The
moment someone wants to use it in a built-in driver that uses
subsystem_init() it will ultimately be chased into driver_init().
> Why not just call this explicitly in driver_init() so that you know it
> will be ok? Just like we do for the platform bus?
Cross that bridge when / if it happens?
Powered by blists - more mailing lists