]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ntc_thermistor) Fix dependencies
authorJean Delvare <jdelvare@suse.de>
Sun, 25 May 2014 23:40:20 +0000 (09:40 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 25 May 2014 23:40:20 +0000 (09:40 +1000)
commit6e3c8ce30fd250eaee82bd557699fc3fbf6c9879
tree55aec0b1edfe4d62ca57f9ad803683adc1895acf
parent60274be507416bf45f06fed5b000f146db6adf1c
hwmon: (ntc_thermistor) Fix dependencies

In commit 9e8269de, support was added for ntc_thermistor devices being
declared in the device tree and implemented on top of IIO. With that
change, a dependency was added to the ntc_thermistor driver:

depends on (!OF && !IIO) || (OF && IIO)

This construct has the drawback that the driver can no longer be
selected when OF is set and IIO isn't, nor when IIO is set and OF is
not. This is a regression for the original users of the driver.

As the new code depends on IIO and is useless without OF, include it
only if both are enabled, and set the dependencies accordingly. This
is clearer, more simple and more correct.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 9e8269de hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
drivers/hwmon/Kconfig
drivers/hwmon/ntc_thermistor.c