Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d7969f59 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Tejun Heo
Browse files

ahci: imx: fix building without hwmon or thermal



When CONFIG_HWMON is disabled, we now get a link failure:

ERROR: "devm_hwmon_device_register_with_groups" [drivers/ata/ahci_imx.ko] undefined!
drivers/ata/ahci_imx.o: In function `imx_ahci_probe':
ahci_imx.c:(.text.imx_ahci_probe+0x304): undefined reference to `devm_thermal_zone_of_sensor_register'

This makes the code calling into the hwmon subsystem compile-time
conditional, and adds a Kconfig dependency to avoid the corner
case of having HWMON=m and AHCI_IMX=y, by forcing AHCI_IMX=m in this
case. The thermal subsystem already has a check in its header, but
that also doesn't cover the THERMAL=m case, so we need a somewhat
complex Kconfig expression to handle all cases.

Fixes: 54643a83 ("ahci: imx: Add imx53 SATA temperature sensor support")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarReviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 7e11aabd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment