Skip to content

Commit 43a0d7f

Browse files
LiHuiSong1kuba-moo
authored andcommitted
net: aquantia: Use HWMON_CHANNEL_INFO macro to simplify code
Use HWMON_CHANNEL_INFO macro to simplify code. Signed-off-by: Huisong Li <lihuisong@huawei.com> Link: https://patch.msgid.link/20250210054710.12855-2-lihuisong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 4d3f687 commit 43a0d7f

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_drvinfo.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,9 @@ static const struct hwmon_ops aq_hwmon_ops = {
113113
.read_string = aq_hwmon_read_string,
114114
};
115115

116-
static u32 aq_hwmon_temp_config[] = {
117-
HWMON_T_INPUT | HWMON_T_LABEL,
118-
HWMON_T_INPUT | HWMON_T_LABEL,
119-
0,
120-
};
121-
122-
static const struct hwmon_channel_info aq_hwmon_temp = {
123-
.type = hwmon_temp,
124-
.config = aq_hwmon_temp_config,
125-
};
126-
127116
static const struct hwmon_channel_info * const aq_hwmon_info[] = {
128-
&aq_hwmon_temp,
117+
HWMON_CHANNEL_INFO(temp, HWMON_T_INPUT | HWMON_T_LABEL,
118+
HWMON_T_INPUT | HWMON_T_LABEL),
129119
NULL,
130120
};
131121

0 commit comments

Comments
 (0)