mirror of
https://github.com/torvalds/linux.git
synced 2026-04-29 12:02:35 -04:00
With CONFIG_THERMAL=m, we get a build error:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c: In function 'cxgb4_thermal_get_trip_type':
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.c:48:11: error: 'struct adapter' has no member named 'ch_thermal'
Once that is fixed by using IS_ENABLED() checks, we get a link error
against the thermal subsystem when cxgb4 is built-in:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_init':
cxgb4_thermal.c:(.text+0x180): undefined reference to `thermal_zone_device_register'
drivers/net/ethernet/chelsio/cxgb4/cxgb4_thermal.o: In function `cxgb4_thermal_remove':
cxgb4_thermal.c:(.text+0x1e0): undefined reference to `thermal_zone_device_unregister'
Finally, since CONFIG_THERMAL can be =m, the Makefile fails to pick up the
extra file into built-in.a, and we get another link failure against the
cxgb4_thermal_init/cxgb4_thermal_remove files, so the Makefile has to
be adapted as well to work for both CONFIG_THERMAL=y and =m.
Fixes: b187191577 ("cxgb4: Add thermal zone support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 lines
541 B
Makefile
18 lines
541 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Chelsio T4 driver
|
|
#
|
|
|
|
obj-$(CONFIG_CHELSIO_T4) += cxgb4.o
|
|
|
|
cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o \
|
|
cxgb4_uld.o srq.o sched.o cxgb4_filter.o cxgb4_tc_u32.o \
|
|
cxgb4_ptp.o cxgb4_tc_flower.o cxgb4_cudbg.o \
|
|
cudbg_common.o cudbg_lib.o cudbg_zlib.o
|
|
cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o
|
|
cxgb4-$(CONFIG_CHELSIO_T4_FCOE) += cxgb4_fcoe.o
|
|
cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
|
|
ifdef CONFIG_THERMAL
|
|
cxgb4-objs += cxgb4_thermal.o
|
|
endif
|