All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonas Malaco <jonas@protocubo.io>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: [PATCH 8/8] hwmon: nzxt-kraken2: Simplify specifying static visibility attribute
Date: Fri, 11 Oct 2024 22:04:31 +0200	[thread overview]
Message-ID: <1ac2be2d-df4f-455a-900d-821fc7bd12c4@gmail.com> (raw)
In-Reply-To: <6f43a3e1-3622-4595-a1ec-2b3ad94bdf5b@gmail.com>

Use new member visible of struct hwmon_ops to simplify specifying
the static attribute visibility.

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

diff --git a/drivers/hwmon/nzxt-kraken2.c b/drivers/hwmon/nzxt-kraken2.c
index ed38645a1..034698232 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,
+	.visible = 0444,
 	.read = kraken2_read,
 	.read_string = kraken2_read_string,
 };
-- 
2.47.0



  parent reply	other threads:[~2024-10-11 20:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 19:53 [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Heiner Kallweit
2024-10-11 19:55 ` [PATCH 1/8] hwmon: i5500_temp: Simplify specifying static visibility attribute Heiner Kallweit
2024-10-11 19:56 ` [PATCH 2/8] hwmon: surface_fan: " Heiner Kallweit
2024-10-11 19:58 ` [PATCH 3/8] hwmon: sl28cpld: " Heiner Kallweit
2024-10-11 19:59 ` [PATCH 4/8] hwmon: gsc: " Heiner Kallweit
2024-10-11 20:00 ` [PATCH 5/8] hwmon: powerz: " Heiner Kallweit
2024-10-11 20:06   ` Thomas Weißschuh
2024-10-11 20:01 ` [PATCH 6/8] hwmon: raspberrypi: " Heiner Kallweit
2024-10-11 20:03 ` [PATCH 7/8] hwmon: intel-m10-bmc: " Heiner Kallweit
2024-10-11 20:04 ` Heiner Kallweit [this message]
2024-10-12  0:02   ` [PATCH 8/8] hwmon: nzxt-kraken2: " Jonas Malaco
2024-10-11 20:24 ` [PATCH 0/8] hwmon: Use new member visible in struct hwmon_ops to simplify drivers Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ac2be2d-df4f-455a-900d-821fc7bd12c4@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=jonas@protocubo.io \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.