]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: (gsc) Simplify specifying static visibility attribute
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 11 Oct 2024 19:59:27 +0000 (21:59 +0200)
committerGuenter 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: <bd909a2c-23ee-437d-9bd4-858119f6f266@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/gsc-hwmon.c

index 4514f3ed90ccd6c422ab9c918f8a08f5f8c84dbd..14a6385cd7cc7837fc3f2865d75391994e4c8896 100644 (file)
@@ -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,
 };