diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-09-27 16:13:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-28 13:11:20 +0100 |
commit | 51bb08dd04a05035a64504faa47651d36b0f3125 (patch) | |
tree | 16806f5d75a868752dac12ec41b86267fc7a8d76 /drivers/net/ethernet/micrel/Makefile | |
parent | 3b1b6e82fb5e08e2cb355d7b2ee8644ec289de66 (diff) | |
download | linux-51bb08dd04a05035a64504faa47651d36b0f3125.tar.bz2 |
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: 797047f875b5 ("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>
Diffstat (limited to 'drivers/net/ethernet/micrel/Makefile')
-rw-r--r-- | drivers/net/ethernet/micrel/Makefile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/micrel/Makefile b/drivers/net/ethernet/micrel/Makefile index 5cc00d22c708..6ecc4eb30e74 100644 --- a/drivers/net/ethernet/micrel/Makefile +++ b/drivers/net/ethernet/micrel/Makefile @@ -4,8 +4,6 @@ # obj-$(CONFIG_KS8842) += ks8842.o -obj-$(CONFIG_KS8851) += ks8851.o -ks8851-objs = ks8851_common.o ks8851_spi.o -obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o -ks8851_mll-objs = ks8851_common.o ks8851_par.o +obj-$(CONFIG_KS8851) += ks8851_common.o ks8851_spi.o +obj-$(CONFIG_KS8851_MLL) += ks8851_common.o ks8851_par.o obj-$(CONFIG_KSZ884X_PCI) += ksz884x.o |