lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon,  9 Jul 2018 17:42:44 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>
Cc:     Stefan Wahren <stefan.wahren@...e.com>,
        Eric Anholt <eric@...olt.net>, Arnd Bergmann <arnd@...db.de>,
        Vadim Pasternak <vadimp@...lanox.com>,
        linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] hwmon: rpi: fix link error against rpi_firmware module

Compile-testing without CONFIG_RASPBERRYPI_FIRMWARE is possible, but we
cannot build the rpi hwmon driver into the kernel if the firmware code
is a loadable module:

drivers/hwmon/raspberrypi-hwmon.o: In function `rpi_hwmon_probe':
raspberrypi-hwmon.c:(.text+0x140): undefined reference to `rpi_firmware_property'
drivers/hwmon/raspberrypi-hwmon.o: In function `get_values_poll':
raspberrypi-hwmon.c:(.text+0x350): undefined reference to `rpi_firmware_property'

This adapts the dependency to disallow that combination.

Fixes: 3c493c885cf8 ("hwmon: Add support for RPi voltage sensor")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/hwmon/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index a4e5d3c9fc71..81da17a42dc9 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1322,7 +1322,7 @@ config SENSORS_PWM_FAN
 
 config SENSORS_RASPBERRYPI_HWMON
 	tristate "Raspberry Pi voltage monitor"
-	depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
+	depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
 	help
 	  If you say yes here you get support for voltage sensor on the
 	  Raspberry Pi.
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ