projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
182137e
)
hwmon: (nzxt-kraken2) Simplify specifying static visibility attribute
author
Heiner Kallweit
<hkallweit1@gmail.com>
Fri, 11 Oct 2024 20:04:31 +0000
(22:04 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Sun, 10 Nov 2024 22:48:06 +0000
(14:48 -0800)
Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Message-ID: <
1ac2be2d
-df4f-455a-900d-
821fc7bd12c4
@gmail.com>
Acked-by: Jonas Malaco <jonas@protocubo.io>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/nzxt-kraken2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hwmon/nzxt-kraken2.c
b/drivers/hwmon/nzxt-kraken2.c
index ed38645a1dc272083be9a063b495ec6d4bc5e436..034698232758615447c5ed5e469bb448b6597fb0 100644
(file)
--- a/
drivers/hwmon/nzxt-kraken2.c
+++ b/
drivers/hwmon/nzxt-kraken2.c
@@
-35,13
+35,6
@@
struct kraken2_priv_data {
unsigned long updated; /* jiffies */
};
-static umode_t kraken2_is_visible(const void *data,
- enum hwmon_sensor_types type,
- u32 attr, int channel)
-{
- return 0444;
-}
-
static int kraken2_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{
@@
-81,7
+74,7
@@
static int kraken2_read_string(struct device *dev, enum hwmon_sensor_types type,
}
static const struct hwmon_ops kraken2_hwmon_ops = {
- .
is_visible = kraken2_is_visible
,
+ .
visible = 0444
,
.read = kraken2_read,
.read_string = kraken2_read_string,
};