Skip to content

Commit ef775a0

Browse files
rddunlapsuryasaimadhu
authored andcommitted
x86/Kconfig: Fix an unused variable error in dell-smm-hwmon
When CONFIG_PROC_FS is not set, there is a build warning (turned into an error): ../drivers/hwmon/dell-smm-hwmon.c: In function 'i8k_init_procfs': ../drivers/hwmon/dell-smm-hwmon.c:624:24: error: unused variable 'data' [-Werror=unused-variable] struct dell_smm_data *data = dev_get_drvdata(dev); Make I8K depend on PROC_FS and HWMON (instead of selecting HWMON -- it is strongly preferred to not select entire subsystems). Build tested in all possible combinations of SENSORS_DELL_SMM, I8K, and PROC_FS. Fixes: 039ae58 ("hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k") Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Pali Rohár <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 9e1ff30 commit ef775a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,8 @@ config TOSHIBA
12561256

12571257
config I8K
12581258
tristate "Dell i8k legacy laptop support"
1259-
select HWMON
1259+
depends on HWMON
1260+
depends on PROC_FS
12601261
select SENSORS_DELL_SMM
12611262
help
12621263
This option enables legacy /proc/i8k userspace interface in hwmon

0 commit comments

Comments
 (0)