From: Heiner Kallweit Date: Fri, 11 Oct 2024 19:59:27 +0000 (+0200) Subject: hwmon: (gsc) Simplify specifying static visibility attribute X-Git-Tag: v6.13-rc1~191^2~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9df39924c47a95a688762616cb3183610985ab9c;p=thirdparty%2Flinux.git 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 Message-ID: Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c index 4514f3ed90ccd..14a6385cd7cc7 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, };