Commit 41fa9a94 authored by Guenter Roeck's avatar Guenter Roeck

hwmon: (nct6775) Drop unsupported fan alarm attributes for NCT6775

NCT6775 does not support alarms for fans 4 and 5. Drop the attributes.

cc: stable@vger.kernel.org # 3.10+
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent b1d2bff6
...@@ -199,7 +199,7 @@ static const s8 NCT6775_ALARM_BITS[] = { ...@@ -199,7 +199,7 @@ static const s8 NCT6775_ALARM_BITS[] = {
0, 1, 2, 3, 8, 21, 20, 16, /* in0.. in7 */ 0, 1, 2, 3, 8, 21, 20, 16, /* in0.. in7 */
17, -1, -1, -1, -1, -1, -1, /* in8..in14 */ 17, -1, -1, -1, -1, -1, -1, /* in8..in14 */
-1, /* unused */ -1, /* unused */
6, 7, 11, 10, 23, /* fan1..fan5 */ 6, 7, 11, -1, -1, /* fan1..fan5 */
-1, -1, -1, /* unused */ -1, -1, -1, /* unused */
4, 5, 13, -1, -1, -1, /* temp1..temp6 */ 4, 5, 13, -1, -1, -1, /* temp1..temp6 */
12, -1 }; /* intrusion0, intrusion1 */ 12, -1 }; /* intrusion0, intrusion1 */
...@@ -3877,10 +3877,12 @@ static int nct6775_probe(struct platform_device *pdev) ...@@ -3877,10 +3877,12 @@ static int nct6775_probe(struct platform_device *pdev)
&sda_fan_input[i].dev_attr); &sda_fan_input[i].dev_attr);
if (err) if (err)
goto exit_remove; goto exit_remove;
err = device_create_file(dev, if (data->ALARM_BITS[FAN_ALARM_BASE + i] >= 0) {
&sda_fan_alarm[i].dev_attr); err = device_create_file(dev,
if (err) &sda_fan_alarm[i].dev_attr);
goto exit_remove; if (err)
goto exit_remove;
}
if (data->kind != nct6776 && if (data->kind != nct6776 &&
data->kind != nct6779) { data->kind != nct6779) {
err = device_create_file(dev, err = device_create_file(dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment