Re: [PATCH v7 1/3] leds: Init leds class earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 09, 2024 at 10:03:40AM +0100, Lee Jones wrote:
> On Wed, 04 Sep 2024, Mariusz Tkaczyk wrote:
> > NPEM driver will require leds class, there is an init-order conflict.
> > Make sure that LEDs initialization happens first and add comment.
[...]
> > --- a/drivers/Makefile
> > +++ b/drivers/Makefile
> > @@ -17,6 +17,9 @@ obj-$(CONFIG_PINCTRL)		+= pinctrl/
> >  obj-$(CONFIG_GPIOLIB)		+= gpio/
> >  obj-y				+= pwm/
> >  
> > +# LEDs must come before PCI, it is needed by NPEM driver
> > +obj-y				+= leds/
> > +
> >  obj-y				+= pci/
> >  
> >  obj-$(CONFIG_PARISC)		+= parisc/
> > @@ -130,7 +133,6 @@ obj-$(CONFIG_CPU_IDLE)		+= cpuidle/
> >  obj-y				+= mmc/
> >  obj-y				+= ufs/
> >  obj-$(CONFIG_MEMSTICK)		+= memstick/
> > -obj-y				+= leds/
> >  obj-$(CONFIG_INFINIBAND)	+= infiniband/
> >  obj-y				+= firmware/
> >  obj-$(CONFIG_CRYPTO)		+= crypto/
> 
> This seems very fragile.
> 
> Isn't there a better way to describe the dependency in Kconfig etc?

In v2 of this series, the correct init order was ensured by
running leds_init() at "arch" initcall level, instead of "subsys":

https://lore.kernel.org/linux-pci/20240528131940.16924-2-mariusz.tkaczyk@xxxxxxxxxxxxxxx/

If you prefer this alternative approach, then Bjorn or Krzysztof
can probably replace the commit on the pci.git/npem branch.

AFAIK, all topic branches in pci.git are to be considered drafts
that can be amended until the pull request is sent.

Thanks,

Lukas




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux