]> git.sur5r.net Git - groeck-nct6775/commitdiff
Auso-generate have_in bit mask
authorGuenter Roeck <linux@roeck-us.net>
Thu, 26 Apr 2012 03:12:34 +0000 (20:12 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 26 Apr 2012 03:12:34 +0000 (20:12 -0700)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index 9cf99f506691bc9ec3ca74f6e59c0c8453bcfae0..1e37a0d7080d5477e4519743226f6ac168d31214 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -3090,7 +3090,6 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
        switch (data->kind) {
        case nct6775:
                data->in_num = 9;
-               data->have_in = 0x1ff;
                data->pwm_num = 3;
                data->auto_pwm_num = 6;
                data->has_fan_div = true;
@@ -3150,7 +3149,6 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
                break;
        case nct6776:
                data->in_num = 9;
-               data->have_in = 0x1ff;
                data->pwm_num = 3;
                data->auto_pwm_num = 4;
                data->has_fan_div = false;
@@ -3209,7 +3207,6 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
                break;
        case nct6779:
                data->in_num = 15;
-               data->have_in = 0x7fff;
                data->pwm_num = 5;
                data->auto_pwm_num = 4;
                data->has_fan_div = false;
@@ -3270,7 +3267,7 @@ static int __devinit nct6775_probe(struct platform_device *pdev)
                err = -ENODEV;
                goto exit_release;
        }
-
+       data->have_in = (1 << data->in_num) - 1;
        data->have_temp = 0;
 
        /*