diff mbox series

[5/9] hwmon: gsc: Use new helper hwmon_visible_0444

Message ID ca6d225d-9049-48f8-afdf-b3d4d781d55a@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series hwmon: Add and use helper hwmon_visible_0444 | expand

Commit Message

Heiner Kallweit Oct. 9, 2024, 8:06 p.m. UTC
Use new helper hwmon_visible_0444 to simplify the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/hwmon/gsc-hwmon.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff mbox series

Patch

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,
 };