All of lore.kernel.org
 help / color / mirror / Atom feed
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 1/9] media: video-i2c: Use HWMON_CHANNEL_INFO macro to simplify code
Date: Fri, 24 Jan 2025 10:26:27 +0800	[thread overview]
Message-ID: <20250124022635.16647-2-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/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


  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 ` Huisong Li [this message]
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 ` [PATCH v1 8/9] w1: w1_therm: w1: " Huisong Li
2025-02-03 11:56   ` (subset) " 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-2-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.