Skip to content

Commit b300c0f

Browse files
committed
Merge tag 'hwmon-for-v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fix from Guenter Roeck: "One patch to drop a non-existent alarm attribute in the nct6775 driver" * tag 'hwmon-for-v6.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6775) Fix non-existent ALARM warning
2 parents 42dc814 + 2dd1d86 commit b300c0f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/hwmon/nct6775-core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1910,6 +1910,10 @@ static umode_t nct6775_in_is_visible(struct kobject *kobj,
19101910
struct device *dev = kobj_to_dev(kobj);
19111911
struct nct6775_data *data = dev_get_drvdata(dev);
19121912
int in = index / 5; /* voltage index */
1913+
int nr = index % 5; /* attribute index */
1914+
1915+
if (nr == 1 && data->ALARM_BITS[in] == -1)
1916+
return 0;
19131917

19141918
if (!(data->have_in & BIT(in)))
19151919
return 0;

0 commit comments

Comments
 (0)