net: ethernet: ti: build cpsw-common for switchdev
authorArnd Bergmann <arnd@arndb.de>
Wed, 11 Dec 2019 12:56:10 +0000 (13:56 +0100)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 14 Dec 2019 20:51:00 +0000 (12:51 -0800)
Without the common part of the driver, the new file fails to link:

drivers/net/ethernet/ti/cpsw_new.o: In function `cpsw_probe':
cpsw_new.c:(.text+0x312c): undefined reference to `ti_cm_get_macid'

Use the same Makefile hack as before, and build cpsw-common.o for
any driver that needs it.

Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/ti/Makefile

index d34df8e5cf941b8ff4e466fdb1731e39db1ee658..ecf776ad86895317479e782d2bb5704b550d3357 100644 (file)
@@ -5,6 +5,7 @@
 
 obj-$(CONFIG_TI_CPSW) += cpsw-common.o
 obj-$(CONFIG_TI_DAVINCI_EMAC) += cpsw-common.o
+obj-$(CONFIG_TI_CPSW_SWITCHDEV) += cpsw-common.o
 
 obj-$(CONFIG_TLAN) += tlan.o
 obj-$(CONFIG_CPMAC) += cpmac.o