summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2024-10-11 21:59:27 +0200
committerGuenter Roeck <linux@roeck-us.net>2024-11-10 14:48:06 -0800
commit9df39924c47a95a688762616cb3183610985ab9c (patch)
tree25ba4f58fec988a72d9cf222ababc365c8839ed7 /drivers
parent10963cef5f510a847939d50c455263618cfe8a70 (diff)
downloadlinux-stable-9df39924c47a95a688762616cb3183610985ab9c.tar.gz
linux-stable-9df39924c47a95a688762616cb3183610985ab9c.tar.bz2
linux-stable-9df39924c47a95a688762616cb3183610985ab9c.zip
hwmon: (gsc) 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: <bd909a2c-23ee-437d-9bd4-858119f6f266@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/gsc-hwmon.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index 4514f3ed90cc..14a6385cd7cc 100644
--- a/drivers/hwmon/gsc-hwmon.c
+++ b/drivers/hwmon/gsc-hwmon.c
@@ -231,15 +231,8 @@ gsc_hwmon_read_string(struct device *dev, enum hwmon_sensor_types type,
return 0;
}
-static umode_t
-gsc_hwmon_is_visible(const void *_data, enum hwmon_sensor_types type, u32 attr,
- int ch)
-{
- return 0444;
-}
-
static const struct hwmon_ops gsc_hwmon_ops = {
- .is_visible = gsc_hwmon_is_visible,
+ .visible = 0444,
.read = gsc_hwmon_read,
.read_string = gsc_hwmon_read_string,
};