diff options
author | Guenter Roeck <linux@roeck-us.net> | 2019-03-20 20:36:00 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2019-04-16 03:19:53 +0300 |
commit | 0ddca57737867bdcd57a81ebc9854297cd27a82b (patch) | |
tree | 88b679b452c34915fdca44d34d495d92e1613c09 | |
parent | c43a113ca2c807c3e66a5de0ec57d69803b8bc10 (diff) | |
download | linux-0ddca57737867bdcd57a81ebc9854297cd27a82b.tar.xz |
hwmon: (ntc_thermistor) Use new HWMON_CHANNEL_INFO() macro
The new macro is indeed quite useful. Let's use it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/ntc_thermistor.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c index f9abeeeead9e..fd47c36a52bc 100644 --- a/drivers/hwmon/ntc_thermistor.c +++ b/drivers/hwmon/ntc_thermistor.c @@ -629,29 +629,9 @@ static umode_t ntc_is_visible(const void *data, enum hwmon_sensor_types type, return 0; } -static const u32 ntc_chip_config[] = { - HWMON_C_REGISTER_TZ, - 0 -}; - -static const struct hwmon_channel_info ntc_chip = { - .type = hwmon_chip, - .config = ntc_chip_config, -}; - -static const u32 ntc_temp_config[] = { - HWMON_T_INPUT | HWMON_T_TYPE, - 0 -}; - -static const struct hwmon_channel_info ntc_temp = { - .type = hwmon_temp, - .config = ntc_temp_config, -}; - static const struct hwmon_channel_info *ntc_info[] = { - &ntc_chip, - &ntc_temp, + HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ), + HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_TYPE), NULL }; |