Thread (12 messages) 12 messages, 4 authors, 2021-02-26

Re: [PATCH 3/3] net: dsa: mt7530: add GPIOLIB dependency

flat view

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-02-25 16:18:06
Also in: lkml

On Thu, Feb 25, 2021 at 4:52 PM DENG Qingfang [off-list ref] wrote:
Hi Arnd,

On Thu, Feb 25, 2021 at 10:40 PM Arnd Bergmann [off-list ref] wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>

The new gpio support may be optional at runtime, but it requires
building against gpiolib:

ERROR: modpost: "gpiochip_get_data" [drivers/net/dsa/mt7530.ko] undefined!
ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/net/dsa/mt7530.ko] undefined!

Add a Kconfig dependency to enforce this.
I think wrapping the GPIO code block with #ifdef CONFIG_GPIOLIB ...
#endif may be a better idea.
In practice there is little difference, as most configurations have GPIOLIB
enabled anyway, in particular every configuration in which this driver is
used.

If you want to send an alternative patch to add the #ifdef, please include

Reported-by: Arnd Bergmann <arnd@arndb.de>

      Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help