[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250124022635.16647-2-lihuisong@huawei.com>
Date: Fri, 24 Jan 2025 10:26:27 +0800
From: Huisong Li <lihuisong@...wei.com>
To: <linux-hwmon@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-media@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-rtc@...r.kernel.org>
CC: <oss-drivers@...igine.com>, <matt@...ostay.sg>, <mchehab@...nel.org>,
<irusskikh@...vell.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<louis.peens@...igine.com>, <hkallweit1@...il.com>, <linux@...linux.org.uk>,
<kabel@...nel.org>, <alexandre.belloni@...tlin.com>, <krzk@...nel.org>,
<zhanjie9@...ilicon.com>, <zhenglifeng1@...wei.com>,
<liuyonglong@...wei.com>, <lihuisong@...wei.com>
Subject: [PATCH v1 1/9] media: video-i2c: Use HWMON_CHANNEL_INFO macro to simplify code
Use HWMON_CHANNEL_INFO macro to simplify code.
Signed-off-by: Huisong Li <lihuisong@...wei.com>
---
drivers/media/i2c/video-i2c.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index 036a6375627a..0dd991d70d53 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -264,18 +264,8 @@ static int amg88xx_set_power(struct video_i2c_data *data, bool on)
#if IS_REACHABLE(CONFIG_HWMON)
-static const u32 amg88xx_temp_config[] = {
- HWMON_T_INPUT,
- 0
-};
-
-static const struct hwmon_channel_info amg88xx_temp = {
- .type = hwmon_temp,
- .config = amg88xx_temp_config,
-};
-
static const struct hwmon_channel_info * const amg88xx_info[] = {
- &amg88xx_temp,
+ HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT),
NULL
};
--
2.22.0
Powered by blists - more mailing lists