diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-10-11 22:01:57 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-11-10 14:48:06 -0800 |
commit | 39a8cf342bc2ad656b4bad536f930e2aa8562151 (patch) | |
tree | 228b9355c6fd94f1ce0132042a22dba338769f9d /drivers/hwmon | |
parent | 1d92c936ca18d60638e1a8807d3e3d492c35d65a (diff) |
hwmon: (raspberrypi) 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: <4e8893a1-b080-4676-97b9-a48ac9ead28a@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/raspberrypi-hwmon.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c index 65cc52e47db0..10ef1e1f9458 100644 --- a/drivers/hwmon/raspberrypi-hwmon.c +++ b/drivers/hwmon/raspberrypi-hwmon.c @@ -81,12 +81,6 @@ static int rpi_read(struct device *dev, enum hwmon_sensor_types type, return 0; } -static umode_t rpi_is_visible(const void *_data, enum hwmon_sensor_types type, - u32 attr, int channel) -{ - return 0444; -} - static const struct hwmon_channel_info * const rpi_info[] = { HWMON_CHANNEL_INFO(in, HWMON_I_LCRIT_ALARM), @@ -94,7 +88,7 @@ static const struct hwmon_channel_info * const rpi_info[] = { }; static const struct hwmon_ops rpi_hwmon_ops = { - .is_visible = rpi_is_visible, + .visible = 0444, .read = rpi_read, }; |