From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
Maximilian Luz <luzmaximilian@gmail.com>,
Ivor Wanders <ivor@iwanders.net>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: [PATCH 2/8] hwmon: surface_fan: Simplify specifying static visibility attribute
Date: Fri, 11 Oct 2024 21:56:52 +0200 [thread overview]
Message-ID: <d5d2570c-dfd9-4be5-ad9f-e721be477131@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/surface_fan.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/hwmon/surface_fan.c b/drivers/hwmon/surface_fan.c
index de3c5a240..aafb4ac92 100644
--- a/drivers/hwmon/surface_fan.c
+++ b/drivers/hwmon/surface_fan.c
@@ -18,14 +18,6 @@ SSAM_DEFINE_SYNC_REQUEST_CL_R(__ssam_fan_rpm_get, __le16, {
.command_id = 0x01,
});
-// hwmon
-static umode_t surface_fan_hwmon_is_visible(const void *drvdata,
- enum hwmon_sensor_types type, u32 attr,
- int channel)
-{
- return 0444;
-}
-
static int surface_fan_hwmon_read(struct device *dev,
enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
@@ -49,7 +41,7 @@ static const struct hwmon_channel_info *const surface_fan_info[] = {
};
static const struct hwmon_ops surface_fan_hwmon_ops = {
- .is_visible = surface_fan_hwmon_is_visible,
+ .visible = 0444,
.read = surface_fan_hwmon_read,
};
--
2.47.0
next prev parent reply other threads:[~2024-10-11 19:56 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 ` Heiner Kallweit [this message]
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 ` [PATCH 8/8] hwmon: nzxt-kraken2: " Heiner Kallweit
2024-10-12 0:02 ` 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=d5d2570c-dfd9-4be5-ad9f-e721be477131@gmail.com \
--to=hkallweit1@gmail.com \
--cc=ivor@iwanders.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luzmaximilian@gmail.com \
/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.