Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[sfrench/cifs-2.6.git] / drivers / hwmon / max31790.c
index 722bcbb9865a2a2a06263c09d837e7d1c0785b70..0b0b04d36931135f57836c5c274c541c2b9b0fe1 100644 (file)
@@ -400,45 +400,27 @@ static umode_t max31790_is_visible(const void *data,
        }
 }
 
-static const u32 max31790_fan_config[] = {
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       HWMON_F_INPUT | HWMON_F_FAULT,
-       0
-};
-
-static const struct hwmon_channel_info max31790_fan = {
-       .type = hwmon_fan,
-       .config = max31790_fan_config,
-};
-
-static const u32 max31790_pwm_config[] = {
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
-       0
-};
-
-static const struct hwmon_channel_info max31790_pwm = {
-       .type = hwmon_pwm,
-       .config = max31790_pwm_config,
-};
-
 static const struct hwmon_channel_info *max31790_info[] = {
-       &max31790_fan,
-       &max31790_pwm,
+       HWMON_CHANNEL_INFO(fan,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_TARGET | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT,
+                          HWMON_F_INPUT | HWMON_F_FAULT),
+       HWMON_CHANNEL_INFO(pwm,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
+                          HWMON_PWM_INPUT | HWMON_PWM_ENABLE),
        NULL
 };