Commit ef775a0e authored by Randy Dunlap's avatar Randy Dunlap Committed by Borislav Petkov

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: 039ae585 ("hwmon: Allow to compile dell-smm-hwmon driver without /proc/i8k")
Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarPali Rohár <pali@kernel.org>
Link: https://lkml.kernel.org/r/20210910071921.16777-1-rdunlap@infradead.org
parent 9e1ff307
......@@ -1256,7 +1256,8 @@ config TOSHIBA
config I8K
tristate "Dell i8k legacy laptop support"
select HWMON
depends on HWMON
depends on PROC_FS
select SENSORS_DELL_SMM
help
This option enables legacy /proc/i8k userspace interface in hwmon
......
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