diff mbox series

[4/9] hwmon: sl28cpld: Use new helper hwmon_visible_0444

Message ID a0226799-0885-441e-91fc-fdc548529433@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:05 p.m. UTC
Use new helper hwmon_visible_0444 to simplify the code.

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

Comments

Michael Walle Oct. 9, 2024, 8:48 p.m. UTC | #1
> Use new helper hwmon_visible_0444 to simplify the code.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Michael Walle <mwalle@kernel.org>

Thanks,
-michael
diff mbox series

Patch

diff --git a/drivers/hwmon/sl28cpld-hwmon.c b/drivers/hwmon/sl28cpld-hwmon.c
index e020f25c9..07fff262e 100644
--- a/drivers/hwmon/sl28cpld-hwmon.c
+++ b/drivers/hwmon/sl28cpld-hwmon.c
@@ -23,13 +23,6 @@  struct sl28cpld_hwmon {
 	u32 offset;
 };
 
-static umode_t sl28cpld_hwmon_is_visible(const void *data,
-					 enum hwmon_sensor_types type,
-					 u32 attr, int channel)
-{
-	return 0444;
-}
-
 static int sl28cpld_hwmon_read(struct device *dev,
 			       enum hwmon_sensor_types type, u32 attr,
 			       int channel, long *input)
@@ -73,7 +66,7 @@  static const struct hwmon_channel_info * const sl28cpld_hwmon_info[] = {
 };
 
 static const struct hwmon_ops sl28cpld_hwmon_ops = {
-	.is_visible = sl28cpld_hwmon_is_visible,
+	.is_visible = hwmon_visible_0444,
 	.read = sl28cpld_hwmon_read,
 };