diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-06-23 16:04:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 17:07:27 -0400 |
commit | bde3f4bb512c34609becce11f23ed6f89e3f488f (patch) | |
tree | 408d7faffc0d91985321acc8295ff2f1ea25c71b | |
parent | e00354825e75a338ced4f4eb16cf08182c116984 (diff) |
hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775
commit 41fa9a944fce1d7efd5ee3d50ac85b92f42dcc3d upstream.
NCT6775 does not support alarms for fans 4 and 5. Drop the attributes.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/hwmon/nct6775.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 2405ab439e80..99cec1825420 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c | |||
@@ -199,7 +199,7 @@ static const s8 NCT6775_ALARM_BITS[] = { | |||
199 | 0, 1, 2, 3, 8, 21, 20, 16, /* in0.. in7 */ | 199 | 0, 1, 2, 3, 8, 21, 20, 16, /* in0.. in7 */ |
200 | 17, -1, -1, -1, -1, -1, -1, /* in8..in14 */ | 200 | 17, -1, -1, -1, -1, -1, -1, /* in8..in14 */ |
201 | -1, /* unused */ | 201 | -1, /* unused */ |
202 | 6, 7, 11, 10, 23, /* fan1..fan5 */ | 202 | 6, 7, 11, -1, -1, /* fan1..fan5 */ |
203 | -1, -1, -1, /* unused */ | 203 | -1, -1, -1, /* unused */ |
204 | 4, 5, 13, -1, -1, -1, /* temp1..temp6 */ | 204 | 4, 5, 13, -1, -1, -1, /* temp1..temp6 */ |
205 | 12, -1 }; /* intrusion0, intrusion1 */ | 205 | 12, -1 }; /* intrusion0, intrusion1 */ |
@@ -3877,10 +3877,12 @@ static int nct6775_probe(struct platform_device *pdev) | |||
3877 | &sda_fan_input[i].dev_attr); | 3877 | &sda_fan_input[i].dev_attr); |
3878 | if (err) | 3878 | if (err) |
3879 | goto exit_remove; | 3879 | goto exit_remove; |
3880 | err = device_create_file(dev, | 3880 | if (data->ALARM_BITS[FAN_ALARM_BASE + i] >= 0) { |
3881 | &sda_fan_alarm[i].dev_attr); | 3881 | err = device_create_file(dev, |
3882 | if (err) | 3882 | &sda_fan_alarm[i].dev_attr); |
3883 | goto exit_remove; | 3883 | if (err) |
3884 | goto exit_remove; | ||
3885 | } | ||
3884 | if (data->kind != nct6776 && | 3886 | if (data->kind != nct6776 && |
3885 | data->kind != nct6779) { | 3887 | data->kind != nct6779) { |
3886 | err = device_create_file(dev, | 3888 | err = device_create_file(dev, |