diff mbox series

[9/9] hwmon: nzxt-kraken2: Use new helper hwmon_visible_0444

Message ID 53c6775f-60a2-44e4-8f14-a7c68c996268@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:09 p.m. UTC
Use new helper hwmon_visible_0444 to simplify the code.

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

Patch

diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c
index 7caf387eb..e46558e2f 100644
--- a/drivers/hwmon/nzxt-kraken2.c
+++ b/drivers/hwmon/nzxt-kraken2.c
@@ -35,13 +35,6 @@  struct kraken2_priv_data {
 	unsigned long updated; /* jiffies */
 };
 
-static umode_t kraken2_is_visible(const void *data,
-				  enum hwmon_sensor_types type,
-				  u32 attr, int channel)
-{
-	return 0444;
-}
-
 static int kraken2_read(struct device *dev, enum hwmon_sensor_types type,
 			u32 attr, int channel, long *val)
 {
@@ -81,7 +74,7 @@  static int kraken2_read_string(struct device *dev, enum hwmon_sensor_types type,
 }
 
 static const struct hwmon_ops kraken2_hwmon_ops = {
-	.is_visible = kraken2_is_visible,
+	.is_visible = hwmon_visible_0444,
 	.read = kraken2_read,
 	.read_string = kraken2_read_string,
 };