]> git.baikalelectronics.ru Git - kernel.git/commit
ne2000: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Sep 2021 13:46:10 +0000 (15:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Sep 2021 10:45:06 +0000 (11:45 +0100)
commit7cf9f63218a072e8c7a74a075c91d10197e489f1
tree029de8b2b50260f903f19a839a464bce0dc7a8fd
parent1b173101a5db8933c2ef4c800d2b5d7b3163f7b4
ne2000: fix unused function warning

Geert noticed a warning on MIPS TX49xx, Atari and presuambly other
platforms when the driver is built-in but NETDEV_LEGACY_INIT is
disabled:

drivers/net/ethernet/8390/ne.c:909:20: warning: ‘ne_add_devices’ defined but not used [-Wunused-function]

Merge the two module init functions into a single one with an
IS_ENABLED() check to replace the incorrect #ifdef.

Fixes: 4d5b4b2927b4 ("make legacy ISA probe optional")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/8390/ne.c