diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-10-11 22:00:49 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-11-10 14:48:06 -0800 |
commit | 1d92c936ca18d60638e1a8807d3e3d492c35d65a (patch) | |
tree | aadb4333b47946251d9f26f7da91dec6f7fb0d49 /drivers | |
parent | 9df39924c47a95a688762616cb3183610985ab9c (diff) | |
download | linux-stable-1d92c936ca18d60638e1a8807d3e3d492c35d65a.tar.gz linux-stable-1d92c936ca18d60638e1a8807d3e3d492c35d65a.tar.bz2 linux-stable-1d92c936ca18d60638e1a8807d3e3d492c35d65a.zip |
hwmon: (powerz) 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>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Message-ID: <c4b4568b-59f6-43ac-8281-536a82ecd6ab@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/powerz.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/hwmon/powerz.c b/drivers/hwmon/powerz.c index cfb635f94d66..4e663d5b4e33 100644 --- a/drivers/hwmon/powerz.c +++ b/drivers/hwmon/powerz.c @@ -54,12 +54,6 @@ static const struct hwmon_channel_info *const powerz_info[] = { NULL }; -static umode_t powerz_is_visible(const void *data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static int powerz_read_string(struct device *dev, enum hwmon_sensor_types type, u32 attr, int channel, const char **str) { @@ -201,7 +195,7 @@ out: } static const struct hwmon_ops powerz_hwmon_ops = { - .is_visible = powerz_is_visible, + .visible = 0444, .read = powerz_read, .read_string = powerz_read_string, }; |