]> git.baikalelectronics.ru Git - kernel.git/commit
net: ks8851: fix link error
authorArnd Bergmann <arnd@arndb.de>
Mon, 27 Sep 2021 14:13:02 +0000 (16:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Sep 2021 12:11:20 +0000 (13:11 +0100)
commitf272d0cce9f3b895c1274c7aa01e78f81fa967a7
tree16806f5d75a868752dac12ec41b86267fc7a8d76
parentc686745a085f24784ab55b0aee8de2666d8ccfe6
net: ks8851: fix link error

An object file cannot be built for both loadable module and built-in
use at the same time:

arm-linux-gnueabi-ld: drivers/net/ethernet/micrel/ks8851_common.o: in function `ks8851_probe_common':
ks8851_common.c:(.text+0xf80): undefined reference to `__this_module'

Change the ks8851_common code to be a standalone module instead,
and use Makefile logic to ensure this is built-in if at least one
of its two users is.

Fixes: 67e6c9246edb ("net: ks8851: Implement Parallel bus operations")
Link: https://lore.kernel.org/netdev/20210125121937.3900988-1-arnd@kernel.org/
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/micrel/Makefile
drivers/net/ethernet/micrel/ks8851_common.c