Commit ebcd210e authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller

cxgb4: fix thermal zone build error

with CONFIG_THERMAL=m and cxgb4 as built-in build fails, and
'commit e70a57fa ("cxgb4: fix thermal configuration dependencies")'
tries to fix it but when cxgb4i is made built-in build fails again,
use IS_REACHABLE instead of IS_ENABLED to fix the issue.

Fixes: e70a57fa (cxgb4: fix thermal configuration dependencies)
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b8c3c10c
...@@ -67,7 +67,6 @@ config CHELSIO_T3 ...@@ -67,7 +67,6 @@ config CHELSIO_T3
config CHELSIO_T4 config CHELSIO_T4
tristate "Chelsio Communications T4/T5/T6 Ethernet support" tristate "Chelsio Communications T4/T5/T6 Ethernet support"
depends on PCI && (IPV6 || IPV6=n) depends on PCI && (IPV6 || IPV6=n)
depends on THERMAL || !THERMAL
select FW_LOADER select FW_LOADER
select MDIO select MDIO
select ZLIB_DEFLATE select ZLIB_DEFLATE
......
...@@ -12,6 +12,4 @@ cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o ...@@ -12,6 +12,4 @@ cxgb4-objs := cxgb4_main.o l2t.o smt.o t4_hw.o sge.o clip_tbl.o cxgb4_ethtool.o
cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o cxgb4-$(CONFIG_CHELSIO_T4_DCB) += cxgb4_dcb.o
cxgb4-$(CONFIG_CHELSIO_T4_FCOE) += cxgb4_fcoe.o cxgb4-$(CONFIG_CHELSIO_T4_FCOE) += cxgb4_fcoe.o
cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o cxgb4-$(CONFIG_DEBUG_FS) += cxgb4_debugfs.o
ifdef CONFIG_THERMAL cxgb4-$(CONFIG_THERMAL) += cxgb4_thermal.o
cxgb4-objs += cxgb4_thermal.o
endif
...@@ -5863,7 +5863,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5863,7 +5863,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!is_t4(adapter->params.chip)) if (!is_t4(adapter->params.chip))
cxgb4_ptp_init(adapter); cxgb4_ptp_init(adapter);
if (IS_ENABLED(CONFIG_THERMAL) && if (IS_REACHABLE(CONFIG_THERMAL) &&
!is_t4(adapter->params.chip) && (adapter->flags & FW_OK)) !is_t4(adapter->params.chip) && (adapter->flags & FW_OK))
cxgb4_thermal_init(adapter); cxgb4_thermal_init(adapter);
...@@ -5932,7 +5932,7 @@ static void remove_one(struct pci_dev *pdev) ...@@ -5932,7 +5932,7 @@ static void remove_one(struct pci_dev *pdev)
if (!is_t4(adapter->params.chip)) if (!is_t4(adapter->params.chip))
cxgb4_ptp_stop(adapter); cxgb4_ptp_stop(adapter);
if (IS_ENABLED(CONFIG_THERMAL)) if (IS_REACHABLE(CONFIG_THERMAL))
cxgb4_thermal_remove(adapter); cxgb4_thermal_remove(adapter);
/* If we allocated filters, free up state associated with any /* If we allocated filters, free up state associated with any
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment