From: Huisong Li <lihuisong@huawei.com>
To: <linux-hwmon@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-media@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-rtc@vger.kernel.org>
Cc: <oss-drivers@corigine.com>, <matt@ranostay.sg>,
<mchehab@kernel.org>, <irusskikh@marvell.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<louis.peens@corigine.com>, <hkallweit1@gmail.com>,
<linux@armlinux.org.uk>, <kabel@kernel.org>,
<alexandre.belloni@bootlin.com>, <krzk@kernel.org>,
<zhanjie9@hisilicon.com>, <zhenglifeng1@huawei.com>,
<liuyonglong@huawei.com>, <lihuisong@huawei.com>
Subject: [PATCH v1 8/9] w1: w1_therm: w1: Use HWMON_CHANNEL_INFO macro to simplify code
Date: Fri, 24 Jan 2025 10:26:34 +0800 [thread overview]
Message-ID: <20250124022635.16647-9-lihuisong@huawei.com> (raw)
In-Reply-To: <20250124022635.16647-1-lihuisong@huawei.com>
Use HWMON_CHANNEL_INFO macro to simplify code.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
drivers/w1/slaves/w1_therm.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index c85e80c7e130..9ccedb3264fb 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -444,18 +444,8 @@ static int w1_read(struct device *dev, enum hwmon_sensor_types type,
}
}
-static const u32 w1_temp_config[] = {
- HWMON_T_INPUT,
- 0
-};
-
-static const struct hwmon_channel_info w1_temp = {
- .type = hwmon_temp,
- .config = w1_temp_config,
-};
-
static const struct hwmon_channel_info * const w1_info[] = {
- &w1_temp,
+ HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
NULL
};
--
2.22.0
next prev parent reply other threads:[~2025-01-24 2:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 2:26 [PATCH v1 0/9] Use HWMON_CHANNEL_INFO macro to simplify code Huisong Li
2025-01-24 2:26 ` [PATCH v1 1/9] media: video-i2c: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 2/9] net: aquantia: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 3/9] net: nfp: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 4/9] net: phy: marvell: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 5/9] net: phy: marvell10g: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 6/9] rtc: ab-eoz9: " Huisong Li
2025-01-24 2:26 ` [PATCH v1 7/9] rtc: ds3232: " Huisong Li
2025-01-24 2:26 ` Huisong Li [this message]
2025-02-03 11:56 ` (subset) [PATCH v1 8/9] w1: w1_therm: w1: " Krzysztof Kozlowski
2025-02-05 2:10 ` lihuisong (C)
2025-01-24 2:26 ` [PATCH v1 9/9] net: phy: aquantia: " Huisong Li
2025-01-24 15:08 ` [PATCH v1 0/9] " Andrew Lunn
2025-01-24 15:41 ` Guenter Roeck
2025-02-05 2:08 ` lihuisong (C)
2025-02-05 2:05 ` lihuisong (C)
2025-01-24 16:58 ` Krzysztof Kozlowski
2025-02-05 1:55 ` lihuisong (C)
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=20250124022635.16647-9-lihuisong@huawei.com \
--to=lihuisong@huawei.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=irusskikh@marvell.com \
--cc=kabel@kernel.org \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=liuyonglong@huawei.com \
--cc=louis.peens@corigine.com \
--cc=matt@ranostay.sg \
--cc=mchehab@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.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.