projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4018e0a
)
hwmon: (it87) Improve temperature reporting support
author
Frank Crawford
<frank@crawford.emu.id.au>
Fri, 7 Jul 2023 12:29:51 +0000
(22:29 +1000)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 21 Aug 2023 13:04:29 +0000
(06:04 -0700)
Add test if thermistor sensor type attribute should be visible, i.e.
test if the attribute is defined.
Signed-off-by: Frank Crawford <frank@crawford.emu.id.au>
Link:
https://lore.kernel.org/r/20230707123005.956415-3-frank@crawford.emu.id.au
[groeck: Dropped unnecessary 'type' variable in it87_temp_is_visible()]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/it87.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/it87.c
b/drivers/hwmon/it87.c
index f9703c4e3a9d0d6b5a6e04574aa6371101281e4f..36cc7a2b56b5500d212e50b6c596cbbc741f3805 100644
(file)
--- a/
drivers/hwmon/it87.c
+++ b/
drivers/hwmon/it87.c
@@
-2328,6
+2328,12
@@
static umode_t it87_temp_is_visible(struct kobject *kobj,
if (!(data->has_temp & BIT(i)))
return 0;
+ if (a == 3) {
+ if (get_temp_type(data, i) == 0)
+ return 0;
+ return attr->mode;
+ }
+
if (a == 5 && !has_temp_offset(data))
return 0;