Re: [PATCH] net: dsa: realtek: add LEDS_CLASS dependency

From: Luiz Angelo Daros de Luca
Date: Sat Jun 08 2024 - 12:03:40 EST


> On Tue, May 28, 2024 at 2:04 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > This driver fails to link when LED support is disabled:
> >
> > ERROR: modpost: "led_init_default_state_get" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> > ERROR: modpost: "devm_led_classdev_register_ext" [drivers/net/dsa/realtek/rtl8366.ko] undefined!
> >
> > Add a dependency that prevents this configuration.
> >
> > Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
> > Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> The QCA driver in drivers/net/dsa/qca/* instead makes the feature
> optional on LED class, so it is in a separate file with stubs if the
> LED class is not selected.

That would be great.

> Luiz do you wanna try this or should I make a patch like that?

You can do it. I'm a bit away from programming these days. Thanks.

> Yours,
> Linus Walleij

Regards,

Luiz