[PATCH 5/9] hwmon: gsc: Use new helper hwmon_visible_0444
Heiner Kallweit
hkallweit1 at gmail.com
Wed Oct 9 13:06:32 PDT 2024
Use new helper hwmon_visible_0444 to simplify the code.
Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
drivers/hwmon/gsc-hwmon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index 4514f3ed9..d70b4e305 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,
+ .is_visible = hwmon_visible_0444,
.read = gsc_hwmon_read,
.read_string = gsc_hwmon_read_string,
};
--
2.47.0
More information about the linux-arm-kernel
mailing list