From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>, Xu Yilun <yilun.xu@intel.com>,
Tom Rix <trix@redhat.com>
Cc: "linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: [PATCH 7/8] hwmon: intel-m10-bmc: Simplify specifying static visibility attribute
Date: Fri, 11 Oct 2024 22:03:13 +0200 [thread overview]
Message-ID: <8ef99170-b37d-4c9a-b3bf-59f4ea76cf29@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/intel-m10-bmc-hwmon.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/hwmon/intel-m10-bmc-hwmon.c b/drivers/hwmon/intel-m10-bmc-hwmon.c
index 96397ae6f..e221f2c1f 100644
--- a/drivers/hwmon/intel-m10-bmc-hwmon.c
+++ b/drivers/hwmon/intel-m10-bmc-hwmon.c
@@ -565,13 +565,6 @@ static const struct m10bmc_hwmon_board_data n6000bmc_hwmon_bdata = {
.hinfo = n6000bmc_hinfo,
};
-static umode_t
-m10bmc_hwmon_is_visible(const void *data, enum hwmon_sensor_types type,
- u32 attr, int channel)
-{
- return 0444;
-}
-
static const struct m10bmc_sdata *
find_sensor_data(struct m10bmc_hwmon *hw, enum hwmon_sensor_types type,
int channel)
@@ -729,7 +722,7 @@ static int m10bmc_hwmon_read_string(struct device *dev,
}
static const struct hwmon_ops m10bmc_hwmon_ops = {
- .is_visible = m10bmc_hwmon_is_visible,
+ .visible = 0444,
.read = m10bmc_hwmon_read,
.read_string = m10bmc_hwmon_read_string,
};
--
2.47.0
next prev parent reply other threads:[~2024-10-11 20:03 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 ` Heiner Kallweit [this message]
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=8ef99170-b37d-4c9a-b3bf-59f4ea76cf29@gmail.com \
--to=hkallweit1@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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.