We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1d2bff commit 41fa9a9Copy full SHA for 41fa9a9
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 */
200
17, -1, -1, -1, -1, -1, -1, /* in8..in14 */
201
-1, /* unused */
202
- 6, 7, 11, 10, 23, /* fan1..fan5 */
+ 6, 7, 11, -1, -1, /* fan1..fan5 */
203
-1, -1, -1, /* unused */
204
4, 5, 13, -1, -1, -1, /* temp1..temp6 */
205
12, -1 }; /* intrusion0, intrusion1 */
@@ -3877,10 +3877,12 @@ static int nct6775_probe(struct platform_device *pdev)
3877
&sda_fan_input[i].dev_attr);
3878
if (err)
3879
goto exit_remove;
3880
- err = device_create_file(dev,
3881
- &sda_fan_alarm[i].dev_attr);
3882
- if (err)
3883
- goto exit_remove;
+ if (data->ALARM_BITS[FAN_ALARM_BASE + i] >= 0) {
+ err = device_create_file(dev,
+ &sda_fan_alarm[i].dev_attr);
+ if (err)
3884
+ goto exit_remove;
3885
+ }
3886
if (data->kind != nct6776 &&
3887
data->kind != nct6779) {
3888
err = device_create_file(dev,
0 commit comments