diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-10-11 23:04:31 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-11-11 01:48:06 +0300 |
commit | 83cca55a63344f0d43102badc0e77e715180153f (patch) | |
tree | b283eed4bfe82b64b9d2e36b2789052f109f900d /drivers/hwmon | |
parent | 182137ecfb37509127fc94b1edb2e2b5dc6fccf1 (diff) | |
download | linux-83cca55a63344f0d43102badc0e77e715180153f.tar.xz |
hwmon: (nzxt-kraken2) Simplify specifying static visibility attribute
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/nzxt-kraken2.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c index ed38645a1dc2..034698232758 100644 --- 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, }; |