From ef74c087e732f0bc2aadb8e80b81afc502b5d704 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 25 Apr 2012 20:12:34 -0700 Subject: [PATCH] Auso-generate have_in bit mask Signed-off-by: Guenter Roeck --- nct6775.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nct6775.c b/nct6775.c index 9cf99f5..1e37a0d 100644 --- 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; /* -- 2.39.5